in reply to Adding element to Array?
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.chomp $list; push @array,$list if length($list) > 0;
Potentia vobiscum ! (Si hoc legere scis nimium eruditionis habes)
|
|---|