Re: I need scoping help

2009-03-04 Thread sf
On Mar 4, 11:47 am, stufor...@gmail.com (Sf) wrote: > this is my problem: variable theParent never updates - it always stays > "1" > > if ($ARGV[0] eq ""){ >         print STDOUT "Enter the filename and path you wish to use:"; >         $nameoffile=; >         }} > > $theHL = 1; > $theParent = "1";

Re: I need scoping help

2009-03-04 Thread John W. Krahn
sf wrote: this is my problem: variable theParent never updates - it always stays "1" if ($ARGV[0] eq ""){ if ( @ARGV != 1 ) { print STDOUT "Enter the filename and path you wish to use:"; $nameoffile=; chomp $nameoffile; } } You have a } there without

Re: I need scoping help

2009-03-04 Thread Gunnar Hjalmarsson
sf wrote: this is my problem: variable theParent never updates - it always stays "1" You have bigger problems than that; for instance your program misses: use strict; use warnings; if ($ARGV[0] eq ""){ print STDOUT "Enter the filename and path you wish to use:"; $nam

I need scoping help

2009-03-04 Thread sf
this is my problem: variable theParent never updates - it always stays "1" if ($ARGV[0] eq ""){ print STDOUT "Enter the filename and path you wish to use:"; $nameoffile=; } } $theHL = 1; $theParent = "1"; open (FILENAME, "$nameoffile") or die "cant open file\n"; open (TOFI