- or download this
#!/usr/bin/perl
use warnings;
...
sub process_file {
....
}
- or download this
package My::FileProcessor;
use strict;
...
}
1;
- or download this
#!/usr/bin/perl
use warnings;
...
eval { process_file($file) };
die "Could not process $file: $@" if $@;
}