Jo for lists and groups wrote:
Are you supposed to be printing something here?
Somewhat newb, but this doesn't look right to me:
print (FO);
That is short for:
print( FO $_ );
The $_ variable is the default in a lot of places in Perl code.
I'm guessing you want to remove commas an
Are you supposed to be printing something here?
Somewhat newb, but this doesn't look right to me:
print (FO);
I'm guessing you want to remove commas and so are rewriting the line into a
new file after subst. I'd probably do
print FO "$_";
I suspect your way may just be leaving the server
- CFS
[mailto:david.wag...@fedex.com]
Sent: Thursday, July 16, 2009 1:46 PM
To: Patrick K Christopher TANAGER; beginners@perl.org
Subject: RE: While issues
> -Original Message-
> From: Patrick K Christopher TANAGER
> [mailto:pchristop...@tanagerinc.com]
> Sent: Thursday, July 16
> -Original Message-
> From: Patrick K Christopher TANAGER
> [mailto:pchristop...@tanagerinc.com]
> Sent: Thursday, July 16, 2009 11:39
> To: beginners@perl.org
> Subject: While issues
>
> I can't seem to find this oddness in this script.
> #! /usr/bin/pe
Patrick K Christopher TANAGER wrote:
I can't seem to find this oddness in this script.
#! /usr/bin/perl
open(FH,"<$ARGV[0]") || die ("File failed to open!\n");
open(FO,">$ARGV[1]") || die ("Output failed to open!\n");
while (){
s/,//g
s/,//g;
# Watch your semi-colons :)
print (FO);
}
clo
I can't seem to find this oddness in this script.
#! /usr/bin/perl
open(FH,"<$ARGV[0]") || die ("File failed to open!\n");
open(FO,">$ARGV[1]") || die ("Output failed to open!\n");
while (){
s/,//g
print (FO);
}
close (FH);
close (FO);
open(FH1,"$ARGV[2]").
The problem is the first whil