Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: my $x or my ($x)

by benizi (Hermit)
on Apr 25, 2006 at 15:45 UTC ( #545591=note: print w/replies, xml ) Need Help??


in reply to Re^3: my $x or my ($x)
in thread my $x or my ($x)

I prefer slicing. Instead of:

my (undef, $foo, undef, $bar) = @array;

or

(undef, my $foo, undef, my $bar) = @array;

do:

my ($foo, $bar) = @array[1,3];

e.g.

my ($size, $mtime) = (stat $filename)[7,9];

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://545591]
help
Chatterbox?
[marto]: choroba, have you moved to Vietnam or just there for a while?
[Discipulus]: marto i think him pointed me is not morning in vietnam now.. but the quote is invariable

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2017-06-27 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (600 votes). Check out past polls.