Recently I found this bit of code that I wrote
long ago.  I am a little surprised this works
($1 and $2 get transferred to the scalars).
I don't write that way anymore, but I am
leaving it that way in this program.


use strict;
use warnings;

my $test = 'abcdefgh';
my ($latm, $longm) = $test =~ /(ab).*(fg)/i;
print "$latm, $longm\n";


Prints this:
ab, fg



Mike
_______________________________________________
Houston mailing list
[email protected]
https://mail.pm.org/mailman/listinfo/houston
Website: http://houston.pm.org/

Reply via email to