Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Simple RegEx Substring Extraction from a Delimited Text Recordby ayrnieu (Beadle) |
on Mar 15, 2006 at 05:38 UTC ( [id://536779]=note: print w/replies, xml ) | Need Help?? |
($int) = $rec =~ /(INT=\d*(?=!|$))/
Or you can internalize your DB into structured data when you load it, rather than pass around such strings. Or you can consider Data::Record. I tend to make a blessed array for the database, and fill it with objects for the records. At least at first.
In Section
Seekers of Perl Wisdom
|
|