Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: What I Most Recently Learned in Perl, But Should Have Already Known

by imp (Priest)
on Aug 22, 2006 at 21:17 UTC ( #568971=note: print w/ replies, xml ) Need Help??


in reply to What I Most Recently Learned in Perl, But Should Have Already Known

I was aware of this:

my $indent = ' 'x5; # Yields ' '
But didn't realize I could also do this:
my @list = (1)x5; # Yields (1,1,1,1,1)
So I can stop doing this:
@placeholders = map {'?'} @columns;
And start doing this:
@placeholders = ('?')x @columns;


Comment on Re: What I Most Recently Learned in Perl, But Should Have Already Known
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2015-05-25 03:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (478 votes), past polls