in reply to Regex Capture Fails (was: stupid $1)
Every time you use regular expression, you reset the variables $1..$9. Try reordering your code so that you get everything out of the first regular expression before executing another one.
You can also capture these variables by assigning the result of the bind to an array as in (untested):
my ($job, $set, $predlnr) = $_=~ /^' PJOB='(.*)' PSET='(.*)' PJNO='(.* +)' WORKDAY='/; $predlnr =~ s/^00//; $jobstation=$jobstations{$jset}; print "follows $jobstation\#$set.${job}_$predlnr\n\n\n";
--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Re: stupid $1
by merlyn (Sage) on Mar 04, 2003 at 20:58 UTC | |
by Cody Pendant (Prior) on Mar 05, 2003 at 00:55 UTC | |
by merlyn (Sage) on Mar 05, 2003 at 02:00 UTC |