Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Help me write a good reg-exp for this text

by benn (Vicar)
on Sep 05, 2003 at 16:07 UTC ( #289255=note: print w/replies, xml ) Need Help??


in reply to Help me write a good reg-exp for this text

As this looks like fixed-length formatting, I wouldn't go with a regex at all, but with...
my ($desc,$code) = unpack("A60 A*",$line);#or however long 1st field i +s. $description_hash{$code}=$desc;
Cheers, Ben. Update: as would hardburn :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://289255]
help
Chatterbox?
[choroba]: Corion A colleague has helped me. It seems the "Modification of read-only value" was caused by old Test::More version which doesn't have done_testing, plus the old bug with $@ sometimes showing a different exception
[choroba]: will upload a fixed version and see
[Corion]: choroba: Ah, OK - sounds like a really weird combination :)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2018-06-25 14:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?