#! /usr/bin/env perl use strict; use warnings; use File::Slurp qw/slurp/; # I am a unix filter! die "usage: <pattern> <file>\n" unless @ARGV == 2; my $p = $ARGV[0]; my $fc = slurp $ARGV[1]; while (defined($_ = <STDIN>)) { s/\Q$p/$fc/; print }
In reply to Re: Reading from another file.
by ayrnieu
in thread Reading from another file.
by will
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |