- or download this
my $fractionValue =
( $str =~ m{^(\d+)/([1-9]\d*)} ) # regex match will evaluate to
+true or false
...
: # otherwise (if above condition was false), ...
"undefined" # return this value
; # end of statement
- or download this
/blah/
m/blah/
m=blah=
m!blah!
m{blah}
- or download this
/http:\/\/my\/path\/to\/insanity/
m{my/path/back/to/sanity}
- or download this
$_ = "123.456/789-0";
if ( /(\d+)\D(\d+)\D(\d+)/ ) {
printf( "Found three numbers: %d was between %d and %d\n", $2, $1,
+ $3 );
}
- or download this
if ( $_ =~ /(\d+)\D(\d+)\D(\d+)/ ) { ...