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

Re: shift vs. @_ (where @_ evaluates to 1)

by pfaut (Priest)
on May 09, 2003 at 17:58 UTC ( #256952=note: print w/replies, xml ) Need Help??


in reply to shift vs. @_ (where @_ evaluates to 1)

my $strFoo = @_ evaluates @_ in scalar context. Arrays in scalar context return their size. What you want is my ($strFoo) = @_ which evaluates @_ in list context returning its values.

90% of every Perl application is already written.
dragonchild

Replies are listed 'Best First'.
Re: Re: shift vs. @_ (where @_ evaluates to 1)
by P0w3rK!d (Pilgrim) on May 09, 2003 at 18:47 UTC
    DoH! I had it that way and changed it.

    Thank you :)

    -P0w3rK!d

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2021-03-02 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (41 votes). Check out past polls.

    Notices?