![]() |
|
Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Afternoon fellow monks,
I've only just started learning Perl and have been a little stumped with the following,i know perl has lots of nifty shortcuts but is this possible... given a function, (the one i've been using is split) that returns an array is it possible to only return the first element of the array from the function and assign that to a scalar... i.e
$bar = "some.text";
now i know i could make $foo an array like @foo and access the first element of that.
thanks In reply to Returning first element of an array from a function by lcanty
|
|