Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- my $in = $ARGV[0];
- if (! defined $in) {
- die "Usage: $0 filename";
- }
- my $out = $in;
- $out =~ s%..%~/captain/%;
- if (! open $in_fh, '<', $in ) {
- die "Can't open '$in': $!";
- }
- if (! open $out_fh, '>', out ) {
- die "Can't write '$out': $!";
- }
- while (<$out_fh>) {
- print out $_;
- }
- close $out_fh;
- close $in_fh;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement