in reply to extract pattern from large blob of text
@- and @+ are arrays, as documented in perlvar. Maybe you wanted to actually capture things?
My approach would be to also capture the nonce value in the same regular expression match:
if( $message =~ /nonce\s+=\s+"([^"]+)"/ ){ my $nonce= $1; print "Found nonce: $nonce\n"; } else { die "No nonce found in message:" . $message; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: extract pattern from large blob of text
by littleperl (Initiate) on Mar 06, 2015 at 14:51 UTC | |
by Corion (Patriarch) on Mar 06, 2015 at 14:56 UTC | |
by littleperl (Initiate) on Mar 06, 2015 at 15:14 UTC |