![]() |
|
Think about Loose Coupling | |
PerlMonks |
Re: Adding element to Array?by NetWallah (Canon) |
on Oct 13, 2009 at 05:30 UTC ( #800848=note: print w/replies, xml ) | Need Help?? |
chomp is your friend. If the $list is EMPTY, it will only contain a linefeed character(linux), which will be removed by chomp, so the following code should work: More experienced programmers would probably use a regular expression, looking for a "word" character before collecting it. Potentia vobiscum ! (Si hoc legere scis nimium eruditionis habes)
In Section
Seekers of Perl Wisdom
|
|