I am currently playing around with a Perl script which is supposed to read lines of text from files, chomp, then chop them, and then print the output to an output file. Only problem is, is that the script is starting at the second line in the (input) text file, and skipping every other line. Here is the code...
#!/usr/bin/perl
my $filestring = $ARGV[0];
my $outfile_str = "$ARGV[1]"."_new";
open(IN, "<$filestring");
open(OUT, ">$outfile_str");
my $string_parser;
while(<IN>){
$string_parser = <IN>;
print "$string_parser";
chomp $string_parser;
chop $string_parser;
print OUT "$string_parser ";
}
close(IN);
close(OUT);
Any ideas?