Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    # or inline
    
    work(2, 3, sub { print "$_[0], $_[1]\n"; })
    
  2. or download this
    my $regex = qr/$self->{regex}/;
    while(<$input>){
        my $result = /$regex/;
            $self->{callback_ref}($result,$line,$output);
    }