Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Reading from another file.

by ayrnieu (Beadle)
on Mar 20, 2006 at 00:05 UTC ( [id://537834]=note: print w/replies, xml ) Need Help??


in reply to Reading from another file.

#! /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 }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://537834]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 02:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found