Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: print the array using command line arguements

by loris (Hermit)
on Nov 30, 2006 at 07:57 UTC ( #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 . . ."


Comment on Re: print the array using command line arguements
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2015-08-01 18:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found
    past polls