On Thu, 17 Oct 2002, Belden Lyman wrote: > Kevin Gurney wrote: > > > > P.S If anyone feels so inclined, a better way of matching > > > the numbers would be most appreciated as I'm simply picking > > everything in a 12 char range each time. > > In the interest of more than one way, here's something else: > > pos($_) = 9; # skip first 9 chars > push @ext, $1 while /(.{12})/g;
Wouldn't it be better to use split with a zero width lookahead assertion? S. -- Shevek I am the Borg. sub AUTOLOAD{my$i=$AUTOLOAD;my$x=shift;$i=~s/^.*://;print"$x\n";eval qq{*$AUTOLOAD=sub{my\$x=shift;return unless \$x%$i;&{$x}(\$x);};};} foreach my $i (3..65535) { &{'2'}($i); }