Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: "$_" vs. $_

by bart (Canon)
on Apr 07, 2007 at 18:16 UTC ( #608846=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub foo
    {
        while (@_) { local $_ = shift; $params->{$_} = shift; }
        print "$_: $params->{$_}\n", for keys %$params;
    }
    
  2. or download this
    sub foo
    {
    ...
        while (@_) { $_ = shift; $params->{$_} = shift; }
        print "$_: $params->{$_}\n", for keys %$params;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://608846]
help
Chatterbox?
[Discipulus]: ouch! it outputs always same fields?
[harishnv]: Can someone give me a solution fast
[shmem]: harishnv: no way if you don't provide code and samples, as stated

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2018-02-20 08:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (268 votes). Check out past polls.

    Notices?