[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Problem - rewrite and simplify



"Rubinow, Larry" wrote:

> Why chop (or chomp) when you don't have to?
> 
> push( @ids, split(/, |\n/, $line)) while ($line = <CLONEIDSLIST>);

How true.

# depunctuate and tokenize incoming [comma or whitespace] delimited data
@ids=map{s/\W//g;tr/A-Z/a-z/;$_}(map {split(/[,\s]+/)} <CLONEIDSLIST> );




________________________________________________________________________
  David Nicol 816.235.1187 UMKC Network Operations david@news.umkc.edu
     "on a 80x24 character cell terminal in a damp basement, under
       a bare light bulb, perched atop a backless wooden stool."

==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org