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

You should try it first. (Yes, it's legal.) But you can also do:
my ($name, $dept, $status) = (get_info())[0,1,3];
_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: Re: Declaring variables - is it legal to do this?
by kiat (Vicar) on May 15, 2004 at 04:59 UTC
    Thanks, japhy!

    Yes, I have used it in my code and there doesn't seem to be any problems but I wanted to be sure that I'm not inventing the wrong syntax :)