Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    for my $str ('', ' ', '\0', "\n", undef) {
        print "matched '$str'\n" if $str =~ /\A\z/;
    }
    
  2. or download this
    matched ''
    Use of uninitialized value $str in pattern match (m//) at C:\Users\Pet
    +er\Delme~~\PerlScratch\noname.pl line 8.
    matched ''
    Use of uninitialized value $str in concatenation (.) or string at C:\U
    +sers\Peter\Delme~~\PerlScratch\noname.pl line 8.