Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    exit main();
    ...
        my $line = (caller(0))[2];
        print "line " , $line , ": " , $error , "\n";
    }
    
  2. or download this
    -bash:perl$ perl caller.pl
    line 6: test1
    line 7: test2
    line 8: test3