Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: generating a list of identical elements

by fisher (Priest)
on Jan 19, 2011 at 11:29 UTC ( [id://883094]=note: print w/replies, xml ) Need Help??


in reply to generating a list of identical elements

I suppose using push function will be a better solution? I mean, like this:
sub makelist { my @list; for (1..$_[1]) { push @list, $_[0] }; return @list; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-20 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found