I am running a perl program that reads a file name from commandline substitutes one string with another displays the output
#!/usr/bin/perl open(IN,$ARGV[0]) || die $!; while(<IN>){ s/$ARGV[1]/$ARGV[2]/; print; } exit 0; __END__ # I run this using command # perl myscript.pl THEFILE OLDSTR NEWSTR Can I use <> instead on open file and then <IN> here Thanks Ramprasad -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>