in reply to Values passed into a sub routine
use named Parameter passing concept like
build_url(account => "test",transaction => "test1", location => "India +", fname => "Nikhil", lname => "jain"); build_url(account => "test", fname => "nikhil", lname => "jain"); build_url(account => "test" ,transaction => "test1", fname =>"nikhil", + lname => "jain"); sub build_url { my (%args) = @_; my $fname = $args{fname} || "Bob the Builder"; my $lname = $args{lname} || "none that we know"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Values passed into a sub routine
by believer (Sexton) on Apr 19, 2011 at 18:47 UTC |