develooper Front page | perl.beginners | Postings from April 2010

Filehandle problem

Thread Next
From:
HACKER Nora
Date:
April 29, 2010 01:14
Subject:
Filehandle problem
Message ID:
B0F28E896606CF4599D9B933747818BD0179A08E@MAIL.stgkk.sozvers.at
Hi list,

Thanks for suggesting PerlCritic to me - I just love it :-) 

Following the instructions, I am now trying to change my filehandles
from a bareword style to something more ... uhm, correct ;-) 

I tried 

my $vconfig = IO::File->new("$vconfig") or LOGDIE("$fnc - $vconfig
konnte nicht gelesen werden!\n");
while (<$vconfig>) {
chomp;
if ($_ eq $db) { $dbtype = "V"; last; };
}
close $vconfig;

but I just receive errors:

Use of uninitialized value in scalar chomp at
/opt/data/magna/wartung/dbmove.pl line 231.
Use of uninitialized value in pattern match (m//) at
/opt/data/magna/wartung/dbmove.pl line 232.

Could somebody please tell me why this doesn't work? 

Thanks, 
Nora 




Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About