#! perl -w use strict; $|++; my $source = 'blahperlblahjavablah'; my ($f1, $f2) = $source =~ /blah(\w+)blah(\w+)blah/; # first attempt print "#1==$1==$2==\n"; print "#2==$f1==$f2==\n"; $source = 'blahblahblah'; ($f1, $f2) = $source =~ /blah(\w+)blah(\w+)blah/; # second attempt print "#3==$1==$2==\n"; print "#4==$f1==$f2==\n"; printf "#5==%s\n", unpack "H*", "$2"; #### H:\devperl\perlmonks>scoping-assign.pl #1==perl==java== #2==perl==java== #3==blah== ava== #4====== #5==00617661