Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 contemplating the Monastery: (13)
As of 2014-09-19 15:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (140 votes), past polls