Ask a Question related to PERL Miscellaneous, Design and Development.
-
gilgames #1
uninitialized value in pattern match
#!/usr/bin/perl
use warnings;
use strict "refs";
use strict "subs";
use strict "vars";
our $netscape;
$netscape = ($ENV{HTTP_USER_AGENT} =~ /netscape/i ) ? 1 : 0;
################################
The compileing reports an
uninitialized value in pattern match (m//) at a.pl line 10
In the real program I got about 20 similar errors if I use warnings
option. All I want here to check if the string "netscape" matches the
environment variable or not. I use the
our $netscape;
line to avoid the only once error, but if I omit it does not makes any
difference. Also the
use warnings
line is itself is enough to generate the warning.
Could somebody help me, what is wrong and how can I avoid such
messages.
I use perl v5.6.1 for MSWin32-386-Multithread
Activestate version
gilgames Guest
-
Use of uninitialized value in pattern match (m//) at ./getopt.pl line 14.
Hi, I'm trying to be a good boy and use strict and warnings .. The more I do, the more I feel I'm wasting so much time and should become... -
pattern match
Where can I find infi or doc on "pattern match" used within WHERE clause (mysql). As I need to matche with PHP variables I'd prfer something... -
[ADMIN] Pattern Match
It was Wednesday, December 10, 2003 when Rob Dixon took the soap box, saying: : Before I finally burst my cyanide capsule, may I.. ? No, you may... -
please help !! pattern match
Hi , I need some help me to extract a pattern. The delimiters is a pair of "abcd" and "efgh". Can some one help me with an efficient use of Greedy... -
Pattern match with 2 conditions
Stephan Bour <sbour@niaid.nih.gov> writes: use strict; # is your friend what's the point of this when you just set it back to "" below? ... -
Gilgames #2
Re: uninitialized value in pattern match
<<
$netscape = (defined $ENV{HTTP_USER_AGENT} && $ENV{HTTP_USER_AGENT} =~
/netscape/i ) ? 1 : 0;
hth-
--
Michael Budash
Thanks>>
Gilgames Guest



Reply With Quote

