in reply to Why are lines being skipped in output?
The open is for reading and surely you mean#!usr/bin/env perl open (test, "@ARGV"); while (<test>) { $_ =~ <test>; chomp; s/(th)/TH/gi; print "$_\n"; } close (test);
This, I believe is the issue so instead of thisopen(test, "<$ARGV[0]"); # what happens when more args?
try thiss/(th)/TH/gi;
Its likely that a simplers/th/TH/go;
might work.tr/th/TH/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why are lines being skipped in output?
by Anonymous Monk on Mar 20, 2008 at 08:33 UTC |