Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: print the array using command line arguements

by loris (Hermit)
on Nov 30, 2006 at 07:57 UTC ( [id://586892]=note: print w/replies, xml ) Need Help??


in reply to print the array using command line arguements

Hi,

Try:

my @new = @array[@ARGV];

The problem with your join is that you get a string containing commas, which cannot be treated as an integer. It will only work if you give just one index on the command line, since the join will not then introduce any commas.

HTH,

loris


"It took Loris ten minutes to eat a satsuma . . . twenty minutes to get from one end of his branch to the other . . . and an hour to scratch his bottom. But Slow Loris didn't care. He had a secret . . ."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://586892]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 05:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found