Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Re: Re: scalar my vs list my

by $code or die (Deacon)
on Apr 27, 2001 at 01:56 UTC ( #75936=note: print w/replies, xml ) Need Help??

in reply to Re: Re: scalar my vs list my
in thread my $var = ''; vs. use constant VAR => '';

At the risk of straying further, its ok to do this isn't it:
my ($filename, $filemode, $opmode, $filetype) = ("/path/file", "immolate", "seek", "image/gif");
Ignore me: I really should get into the habbit of reading the last paragraph of peoples' posts.

$ perldoc perldoc

Replies are listed 'Best First'.
Re^4: scalar my vs list my
by tadman (Prior) on Apr 27, 2001 at 02:12 UTC
    What about this unruly specimen:
    (my ($filename, my ($filemode, my ($opmode, my $filetype)))) = "/path/file", "immolate", "seek", "image/gif";
    The one thing that has bugged me about my() was the way it used to cling to the real block, and not the virtual block. As in:
    for (my $n = 0; $n < 100; $n++) { # ... (Stuff) } # ... (More Stuff) for (my $n = 0; $n < 100; $n++) { # ... (Stuff) }
    IIRC, there used to be a condition that generated an error for the second declaration. This seems to have been fixed, thankfully.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2016-10-26 09:42 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (338 votes). Check out past polls.