in reply to Extracting text from a string using regex
That tells me you are using my but you are not using strict! Remember, always use strict.$authentication .= $authentiction. $1. " ";
all is fine.$authentication .= $authentication. $1. " ";
or evenwhile ($str =~/authentication ?(\S+)?/g){ $authentication .= $authentiction. $1. " "; #more perlish }
$authentication = join " ", $str =~ /authentication ?(\S+)?/g; #even + more perlish
|
|---|