Help for this page

Select Code to Download


  1. or download this
    use Modern::Perl;
    use warnings FATAL => qw{ uninitialized };
    ...
    my $funnystring = 'hello $abc and $def and $ghi and $jkl';
    $funnystring =~ s/(\$\w+)/defined eval $1 ? eval $1 : "unknown $1" /ge
    +;
    print $funnystring;
    
  2. or download this
    hello ABC and DEF and unknown $ghi and 0