Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm glad to hear it works OK. :-)
You never really know until you run it against some data I guess.
Do you know of any simple ways to make it respect the order in which they're specified when they're assigned at "my $regex ="?That occured to me after I posted the code, but I wasn't sure it was necessary. Since your categories list is in alphabetical order, you could sort the keys in the print routine like: for my $category (sort keys %data). Glad to be of help!
Update: Just for the record, if the order of records was not in sort order, a few small changes would handle that situation. At the top of the script, before the for loop, you would enter:
Then a small change to the print routine:
In reply to Re^5: very new to perl; suggestions for porting this shell script to perl?
by Cristoforo
|
|