Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Re: Declaring variables - is it legal to do this?

by Belgarion (Chaplain)
on May 15, 2004 at 19:34 UTC ( [id://353671]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Declaring variables - is it legal to do this?
in thread Declaring variables - is it legal to do this?

I believe most code uses the same methods as japhy's example above. I know I've never used the (..., undef, ...) method, but I have used the (...)[0,1,4] method many times. Granted, my experience doesn't include everyone, but I don't recall seeing the undef example in any Perl documentation, while japhy's example (if I recall correctly) is shown.

However, as always it's just a personal opinion. :)

Replies are listed 'Best First'.
Re: Re: Re: Re: Declaring variables - is it legal to do this?
by TilRMan (Friar) on May 15, 2004 at 20:18 UTC

    I've always used:

    (my $name, my $dept, undef, my $status) = get_info();
    but I can't remember why. Did 5.00[45] allow this syntax? I guess I don't have to anymore.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2025-07-18 01:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.