Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my @foo = split('x', $string);
    my $foo = pop(@foo);
    print "Success!\n" if $foo eq "a";
    
  2. or download this
    use strict;
    use warnings;
    ...
    
    (@foo[0..18], $foo) = split('x', $string, 20);  # <-- added limit.
    print "Success!\n" if $foo eq "a";