Help for this page

Select Code to Download


  1. or download this
    $line =~ s/^\$mypic\[0] = "(\w{3})"$/$1/g;
  2. or download this
    my $newval;
    if ($line =~ /^\$mypic\[0] = "(\w{3})"$/) {
       $newval = $1;
    ...
    else {
       # handle failure to get essential value
    }
    
  3. or download this
    my $newval;
    unless ( ($newval) = $line =~ /(\w{3})"$/ ) {
       # handle failure to get essential value
    }