Help for this page

Select Code to Download


  1. or download this
    perl -MO=Deparse try.pl > try2.pl
    perl try2.pl
    
  2. or download this
    perl try.pl
    
  3. or download this
    #!perl
    use strict;
    ...
    s/foo/bar/ for (my $d = 'Shakespear is the food');
    
    print "$d\n";
    
  4. or download this
    Shakespear is the bard
    
  5. or download this
    use Data::Dumper;
    BEGIN {${^WARNING_BITS} = "UUUUUUUUUUUU"}
    ...
        s/foo/bar/;
    }
    print "$d\n";
    
  6. or download this
    Name "main::d" used only once: possible typo at try2.pl line 7.
    Use of uninitialized value in concatenation (.) or string at try2.pl l
    +ine 7.
    
  7. or download this
    (my $d = 'Shakespear is the food') =~ s/foo/bar/;
    
  8. or download this
    /foo/ and $_ .= '1' for (my $d = 'Shakespear is the foo');