in reply to Re^2: Regular Expressions, IF, Issue
in thread Regular Expressions, IF, Issue
#!/perl/bin/perl -w use strict; use warnings; use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); print header(); my $test_match = "D:/newdir/cgi-bin/testbin/errors/cgi-bin/testbin/"; #Here it will match just fine #$test_match =~/(.*?)\/([^\/]+)$/; $test_match =~/(.*)\/([^\/]+)\/$/; print "<br>*****$1*****$2****<br>"; #But in here the if doesn't, it will go to the ELSE, why? if($test_match =~/(.*?)\/([^\/]+)\/$/){ print "<br>^^^^$1^^$2^^^^<br>";} else{ print "No Match"; }
|
|---|