Re: Use of uninitialized value for perl

2017-11-05 Thread John W. Krahn
than zero (the first element) will be undef. So that statement is the same as: $line = undef; > print "it is $line.\n"; > } > > __DATA__ > Danio rerio strain Tuebingen chromosome 1 GRCz11 Primary Assembly > Danio rerio strain Tuebingen chromosome 2 G

Re: Use of uninitialized value for perl

2017-11-04 Thread Uri Guttman
o you shouldn't be splitting on an array anyway. you should be using $_ there which is assigned in the while() line. Use of uninitialized value $line in concatenation (.) or string at foundins.pl line 9, line 1. it is . Use of uninitialized value $line in concatenation (.) or string at

Use of uninitialized value for perl

2017-11-04 Thread Dong Liu
rio strain Tuebingen chromosome 2 GRCz11 Primary Assembly the results is : Use of uninitialized value $line in concatenation (.) or string at foundins.pl line 9, line 1. it is . Use of uninitialized value $line in concatenation (.) or string at foundins.pl line 9, line 2. it is . the aim for th

Re: Use of uninitialized value $j in numeric eq (==) at myfile line 125

2015-07-06 Thread Илья Рассадин
Hi everybody! I think, problem code is ``` if($buf eq chr hex $xhtmlbegin[$j + 1]) { $doread = 1; $j = $j + 1; } else { if($j == 0) { $doread = 1; } else { #this line is very suspicious $j = $

Re: Use of uninitialized value $j in numeric eq (==) at myfile line 125

2015-07-06 Thread Kent Fredric
On 6 July 2015 at 19:43, Nagy Tamas (TVI-GmbH) wrote: > > Yes, I can produce an XML file. I mean, can you paste-bin or attach an XML file which is minimal in size, yet, still causes this problem to occur, so that we may also attempt to see what is happening using said file. I presently have no

AW: Use of uninitialized value $j in numeric eq (==) at myfile line 125

2015-07-06 Thread Nagy Tamas (TVI-GmbH)
I see that in the pattern matching of $j2 goes only to 2. So it recognizes only the "mailto:kentfred...@gmail.com] Gesendet: Montag, 6. Juli 2015 09:35 An: Nagy Tamas (TVI-GmbH) Cc: beginners@perl.org Betreff: Re: Use of uninitialized value $j in numeric eq (==) at myfile line 125 On 6 July

Re: Use of uninitialized value $j in numeric eq (==) at myfile line 125

2015-07-06 Thread Kent Fredric
On 6 July 2015 at 19:15, Nagy Tamas (TVI-GmbH) wrote: > use XML::writer; Is that supposed to be XML::Writer , or is it really XML::writer? Either way, its irrelevant because its not used anywhere. Can you produce an XML file that will repeat the problem, the attached script I can't trigger a f

AW: Use of uninitialized value $j in numeric eq (==) at myfile line 125

2015-07-06 Thread Nagy Tamas (TVI-GmbH)
:" . $j2 . "==" . length 0+@xhtmlend . "\n"; print OUTFILE "ENDFOUND"; $begintagfound = 0; } if($doread == 1) { $n = read FILE, $data, 1; $buf = $data; if($begintagfound == 1) {

Re: Use of uninitialized value $j in numeric eq (==) at myfile line 125

2015-07-03 Thread Shlomi Fish
= 0) { > > $doread = 0; > > # there has to be a begin tag before the end tag > # so we can check for begin tag first > > if($begintagfound == 0) { > if($buf eq chr hex $xhtmlbegin[$j + 1]) { > $doread = 1; > $j = $j + 1; > } else { >

Re: Use of uninitialized value $j in numeric eq (==) at myfile line 125

2015-07-03 Thread Brandon McCaig
+ 1]) { > > $doread = 1; > > $j = $j + 1; > > } else { > > if($j == 0) {... line 125 There are not 125 lines in your entire message. > > … > > > > Says use of uninitialized value $j in numeric eq == at line 125 > > Does

Use of uninitialized value $j in numeric eq (==) at myfile line 125

2015-07-03 Thread Nagy Tamas (TVI-GmbH)
hex $xhtmlbegin[$j + 1]) { $doread = 1; $j = $j + 1; } else { if($j == 0) {... line 125 ... Says use of uninitialized value $j in numeric eq == at line 125 Does anyone has any idea why does it tell $j as uninitialized? I initialized it at the first line to 0. Tamas

Re: Use of uninitialized value in length

2012-05-17 Thread John W. Krahn
Chris Stinemetz wrote: Hello List, Hello, I'm stumped on this one. I'm getting this error: Use of uninitialized value in length at ./DBSR.pl line 21,<> line 6. Use of uninitialized value in length at ./DBSR.pl line 21,<> line 8. Use of uninitialized value in lengt

Re: Use of uninitialized value in length

2012-05-17 Thread Shawn H Corey
On 12-05-17 10:47 AM, Chris Stinemetz wrote: Hello List, I'm stumped on this one. I'm getting this error: Use of uninitialized value in length at ./DBSR.pl line 21,<> line 6. Use of uninitialized value in length at ./DBSR.pl line 21,<> line 8. Use of uninitiali

Use of uninitialized value in length

2012-05-17 Thread Chris Stinemetz
Hello List, I'm stumped on this one. I'm getting this error: Use of uninitialized value in length at ./DBSR.pl line 21, <> line 6. Use of uninitialized value in length at ./DBSR.pl line 21, <> line 8. Use of uninitialized value in length at ./DBSR.pl line 21, <> l

Re: error message "Use of uninitialized value in concatenation (.) or string at

2012-04-12 Thread Shlomi Fish
Hello adit, On Wed, 11 Apr 2012 20:03:28 -0700 (PDT) adit edogawa wrote: > hi, > please help me ... > I have a perl script as follows: > > #! / Usr / bin / perl-w > # Use module > use strict; > use DBI; > Seems like your E-mail user-agent has seriously mangled your Perl code thinking it is fr

error message "Use of uninitialized value in concatenation (.) or string at

2012-04-12 Thread adit edogawa
', '$ Address', '$ Province', '$ Kode_pos', "$ MSISDN ', '$ Email',

RE: Use of uninitialized value in concatenation (.) or string

2012-03-29 Thread Kronheim, David (Contr)
timothy adigun [2teezp...@gmail.com] wrote: >#!/usr/bin/perl >use warnings; >use strict; > >my @wanted = qw( dad mum children); >my @children = qw(tim dan mercy); >my $ref = { >dad => "mick", >mum => "eliz", >children => { first => 'tim', second => 'dan', third => 'merc

Re: Use of uninitialized value in concatenation (.) or string

2012-03-28 Thread Jim Gibson
On 3/28/12 Wed Mar 28, 2012 10:02 AM, "timothy adigun" <2teezp...@gmail.com> scribbled: > Hi Chris, > > On Wed, Mar 28, 2012 at 12:02 PM, Chris Stinemetz > wrote: > >>> >> foreach my $cell ( @wanted ) { >> print "$cell:"; >> foreach my $hr ( @hours ) { >> >foreach(keys %{$href-

Re: Use of uninitialized value in concatenation (.) or string

2012-03-28 Thread timothy adigun
Hi David, On Wed, Mar 28, 2012 at 4:36 PM, Kronheim, David (Contr) < david.kronh...@ftr.com> wrote: > timothy adigun [2teezp...@gmail.com] wrote: > >#!/usr/bin/perl > >use warnings; > >use strict; > > > >my @wanted = qw( dad mum children); > >my @children = qw(tim dan mercy); > >my $ref =

Re: Use of uninitialized value in concatenation (.) or string

2012-03-28 Thread timothy adigun
'01' => '1', >'02' => '1', >'03' => '1', > }, > > ); > > my $href = \%data; > my @wanted = qw(077 078 149); > my @hours = qw(00 01 02 03 0

Re: Use of uninitialized value in concatenation (.) or string

2012-03-28 Thread Алексей Мишустин
2012/3/28 Chris Stinemetz : > I simply want to test to see if @hours exists as a second > key in the hash of hashes %data. > foreach my $cell ( @wanted ) { >  print  "$cell:"; >  foreach my $hr ( @hours ) { >    if ( defined keys %{ $href->{$hr}}){ if ( defined $href->{$cell}{$hr}){ >      pri

Re: Use of uninitialized value in concatenation (.) or string

2012-03-28 Thread Chris Stinemetz
1', '01' => '1', '02' => '1', '03' => '1', }, ); my $href = \%data; my @wanted = qw(077 078 149); my @hours = qw(00 01 02 03 04 05 06); foreach

Re: Use of uninitialized value in concatenation (.) or string

2012-03-27 Thread timothy adigun
am getting the results I want with this iteration through the hash, > but I am stump on clearing the following warnings: > > fyi line 12168 is the last line of the input file. > > Use of uninitialized value in concatenation (.) or string at > ./TESTdeltaT1.pl line 54, <$SUM

Re: Use of uninitialized value in concatenation (.) or string

2012-03-27 Thread Jim Gibson
At 11:05 PM -0500 3/27/12, Chris Stinemetz wrote: Hello list, I am getting the results I want with this iteration through the hash, but I am stump on clearing the following warnings: fyi line 12168 is the last line of the input file. Use of uninitialized value in concatenation (.) or string

Use of uninitialized value in concatenation (.) or string

2012-03-27 Thread Chris Stinemetz
Hello list, I am getting the results I want with this iteration through the hash, but I am stump on clearing the following warnings: fyi line 12168 is the last line of the input file. Use of uninitialized value in concatenation (.) or string at ./TESTdeltaT1.pl line 54, <$SUM> line 1216

Re: Use of uninitialized value within %dict in concatenation (.) or string at

2012-02-18 Thread John W. Krahn
lina wrote: On Sun, Feb 19, 2012 at 3:34 AM, Shawn H Corey wrote: On 12-02-18 11:40 AM, lina wrote: elsif ( $xpm_file =~ /^"(\S+)[",]$/) { Are there some possibilities that something can be done for the part [",]? Make it recognize both end with " or ", elsif( $xmp_file =~ /^\"

Re: Use of uninitialized value within %dict in concatenation (.) or string at

2012-02-18 Thread lina
On Sun, Feb 19, 2012 at 3:34 AM, Shawn H Corey wrote: > On 12-02-18 11:40 AM, lina wrote: >>      elsif ( $xpm_file =~ /^"(\S+)[",]$/) { >> >> Are there some possibilities that something can be done for the part [",]? >> >> Make it recognize both end with " or ", > > >  elsif( $xmp_file

Re: Use of uninitialized value within %dict in concatenation (.) or string at

2012-02-18 Thread Shawn H Corey
On 12-02-18 11:40 AM, lina wrote: >> elsif ( $xpm_file =~ /^"(\S+)[",]$/) { Are there some possibilities that something can be done for the part [",]? Make it recognize both end with " or ", elsif( $xmp_file =~ /^\"([A-Za-z]+)\"\,?$/ ){ my $keys = $1; my @result = (); for m

Re: Use of uninitialized value within %dict in concatenation (.) or string at

2012-02-18 Thread lina
On 18 Feb, 2012, at 23:11, Shawn H Corey wrote: > On 12-02-18 09:42 AM, lina wrote: >> Hi, >> >> Sorry to open a new thread, >> >> Use of uninitialized value within %dict in concatenation (.) or string >> at ./translate.pl line 21,<$fh> line 128

Re: Use of uninitialized value within %dict in concatenation (.) or string at

2012-02-18 Thread Shawn H Corey
On 12-02-18 09:42 AM, lina wrote: Hi, Sorry to open a new thread, Use of uninitialized value within %dict in concatenation (.) or string at ./translate.pl line 21,<$fh> line 128. Here is the whole code (based on the guide form all of you): #!/usr/bin/perl use warnings; use stric

Use of uninitialized value within %dict in concatenation (.) or string at

2012-02-18 Thread lina
Hi, Sorry to open a new thread, Use of uninitialized value within %dict in concatenation (.) or string at ./translate.pl line 21, <$fh> line 128. Here is the whole code (based on the guide form all of you): #!/usr/bin/perl use warnings; use strict; my $file = "dm_proAB.xpm&quo

Re: Error message: Use of uninitialized value in concatenation (.) or string

2012-02-13 Thread Ken Slater
er loop above. Ken >                print $MAP "$up_ac\t$kegg_map{$up_ac}\n"; #---------- line 441. >            } >            close $MAP; >        } > > I get the following error message: > Use of uninitialized value in concatenation (.) or string at pipeline.pl

Error message: Use of uninitialized value in concatenation (.) or string

2012-02-13 Thread venkates
27;>', $kegg_tax_map_path or croak "Failed to open for writing $kegg_tax_map_path: $!"; print $MAP "$up_ac\t$kegg_map{$up_ac}\n"; #-- line 441. } close $MAP; } I get the following error message: Use of uninitial

Re: supressing error message Use of uninitialized value in concatenation....

2012-01-09 Thread Rajeev Prasad
Thank you, the following worked: { no warnings qw(uninitialized); ... } - Original Message - From: Jim Gibson To: perl list Cc: Sent: Monday, January 9, 2012 1:14 PM Subject: Re: supressing error message Use of uninitialized value in concatenation On 1/9/12 Mon  Jan 9, 2012

Re: supressing error message Use of uninitialized value in concatenation....

2012-01-09 Thread Jim Gibson
On 1/9/12 Mon Jan 9, 2012 10:53 AM, "Rajeev Prasad" scribbled: > Hello, > > I have a lot of fields being concatenated to form a string and sometimes the > values are empty, so i am getting this error: > > Use of uninitialized value in concatenation (.) or stri

supressing error message Use of uninitialized value in concatenation....

2012-01-09 Thread Rajeev Prasad
Hello, I have a lot of fields being concatenated to form a string and sometimes the values are empty, so i am getting this error: Use of uninitialized value in concatenation (.) or string at ./script.pl line 144, <$IN_FH> line 1. how can i suppress this? my logic flow: $string1 = &q

Re: Use of uninitialized value warnings

2011-06-06 Thread Uri Guttman
> "CN" == Chris Nehren writes: CN> On Wed, Jun 01, 2011 at 12:00:36 -0400 , Uri Guttman wrote: >> also the use of // for defined or is relatively recent in perl. be >> careful when using it as it may not work in the version you have >> installed or in production. CN> Relatively rec

Re: Use of uninitialized value warnings

2011-06-06 Thread Chris Nehren
On Wed, Jun 01, 2011 at 12:00:36 -0400 , Uri Guttman wrote: > also the use of // for defined or is relatively recent in perl. be > careful when using it as it may not work in the version you have > installed or in production. Relatively recent meaning 3.5 years old, and released in a version of pe

Re: Use of uninitialized value warnings

2011-06-01 Thread Uri Guttman
> "aa" == am0c am0c writes: aa> If you use aa> $log = $log || ''; that should be $log ||= '' ; aa> instead of aa> $log = defined $log ? $log : ''; aa> It might yield a problem because when $log is "0" it is defined but aa> false in boolean context. aa> The correct shorte

Re: Use of uninitialized value warnings

2011-06-01 Thread am0c am0c
If you use $log = $log || ''; instead of $log = defined $log ? $log : ''; It might yield a problem because when $log is "0" it is defined but false in boolean context. The correct shorter version is: $log = $log // ''; And in the line 696: > 696 my ($log, $pass) = $main::global->{login

Re: Use of uninitialized value warnings

2011-05-31 Thread sono-io
On May 31, 2011, at 9:54 AM, Jim Gibson wrote: > $log and $pass are ASSIGNED in line 696, but they are apparently being > assigned an undefined value (undef in Perl-speak). Thanks a million, Jim. You were absolutely correct. I didn't stop to think about the variable result being undefi

Re: Use of uninitialized value warnings

2011-05-31 Thread Jim Gibson
t;{form}->{'ud'} = Encrypt($main::global->{form}->{'ud'}, > $main::global->{config}->{'cookie'}); > 699 } > > These warnings are showing up in the log: > > € Use of uninitialized value $log in concatenation (.) or string at line 697 &g

Use of uninitialized value warnings

2011-05-31 Thread sono-io
>{form}->{'userpass'}) : (); 697 $main::global->{form}->{'ud'} = "%%$main::global->{uid}%%$log%%$pass%%".time(); 698 $main::global->{form}->{'ud'} = Encrypt($main::global->{form}->{'ud'}, $main::global->{config}->{&

RE: Need help with Use of uninitialized value in concatenation (.) or string

2011-01-27 Thread Mark Meyer
Message- > From: CM Analyst [mailto:cmanal...@yahoo.com] > Sent: Thursday, January 27, 2011 6:25 PM > To: Parag Kalra > Cc: beginners@perl.org > Subject: Re: Need help with Use of uninitialized value in concatenation > (.) or string > > This is a sample of the data I a

Re: Need help with Use of uninitialized value in concatenation (.) or string

2011-01-27 Thread CM Analyst
-84f9e0f6609e;|] com.raec.cq.CQCommitException: You wanted to commit a modifyCR based record, but the record was not found in the ClearQuest Database. --- On Thu, 1/27/11, Parag Kalra wrote: From: Parag Kalra Subject: Re: Need help with Use of uninitialized value in concatenation (.) or string To: &qu

Re: Need help with Use of uninitialized value in concatenation (.) or string

2011-01-27 Thread Parag Kalra
ull the date value each time an error > value (hardcoded) is found in the specified log file. The script retrieves > the error value without a problem but I cannot seem get the date value. Can > anyone tell me what I need to do? > > The error message when I run the script is: > > Us

RE: Need help with Use of uninitialized value in concatenation (.) or string

2011-01-27 Thread Mark Meyer
Can you send an example of the data in the log file? tm -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Need help with Use of uninitialized value in concatenation (.) or string

2011-01-27 Thread CM Analyst
run the script is: Use of uninitialized value in concatenation (.) or string at script.pl line 32 where line 32 is where I am calling this: "print $date"; Here is the script: use warnings; use strict; #Specify the path to the log file you want to read, for ex. application log# open (

Re: Use of uninitialized value in print at...

2010-06-07 Thread Chas. Owens
ecently I have started using [Carp::REPL][1] to test code. Here is an example session: cow...@amans:~$ perl -MCarp::REPL=warn g.pl Use of uninitialized value $z in multiplication (*) at g.pl line 10. Trace begun at g.pl line 10 re.pl(main):001:0> :l File g.pl: 5: 6: my $x = 5; 7: my $y =

Re: Use of uninitialized value in print at...

2010-06-07 Thread Bryan Harris
> On Sun, Jun 6, 2010 at 08:19, Shawn H Corey wrote: >> On 10-06-05 03:26 PM, Bryan Harris wrote: >>> >>> [console] >>> $ perl -e 'use warnings; $c=undef; printf("%s", $c->[0]{dog})' >>> Use of uninitialized value in printf

Re: Use of uninitialized value in print at...

2010-06-06 Thread Uri Guttman
>>>>> "SHC" == Shawn H Corey writes: SHC> On 10-06-05 03:26 PM, Bryan Harris wrote: >> [console] >> $ perl -e 'use warnings; $c=undef; printf("%s", $c->[0]{dog})' >> Use of uninitialized value in printf at -e line 1.

Re: Use of uninitialized value in print at...

2010-06-06 Thread Chas. Owens
On Sun, Jun 6, 2010 at 10:49, Philip Potter wrote: > On 6 June 2010 14:37, Shawn H Corey wrote: >> On 10-06-06 09:06 AM, Chas. Owens wrote: >>> >>> But that is not the problem; autovivification will create the references: >>> >>> perl -MData::Dumper -le '$c->[0]{a}; print Dumper $c' >>> >> >> But

Re: Use of uninitialized value in print at...

2010-06-06 Thread Shawn H Corey
On 10-06-06 10:49 AM, Philip Potter wrote: On 6 June 2010 14:37, Shawn H Corey wrote: On 10-06-06 09:06 AM, Chas. Owens wrote: But that is not the problem; autovivification will create the references: perl -MData::Dumper -le '$c->[0]{a}; print Dumper $c' But that is the problem. Autovivi

Re: Use of uninitialized value in print at...

2010-06-06 Thread Philip Potter
On 6 June 2010 14:37, Shawn H Corey wrote: > On 10-06-06 09:06 AM, Chas. Owens wrote: >> >> But that is not the problem; autovivification will create the references: >> >> perl -MData::Dumper -le '$c->[0]{a}; print Dumper $c' >> > > But that is the problem.  Autovivification should not happen for

Re: Use of uninitialized value in print at...

2010-06-06 Thread Chas. Owens
On Sun, Jun 6, 2010 at 09:37, Shawn H Corey wrote: > On 10-06-06 09:06 AM, Chas. Owens wrote: >> >> But that is not the problem; autovivification will create the references: >> >> perl -MData::Dumper -le '$c->[0]{a}; print Dumper $c' >> > > But that is the problem.  Autovivification should not hap

Re: Use of uninitialized value in print at...

2010-06-06 Thread Shawn H Corey
On 10-06-06 09:06 AM, Chas. Owens wrote: But that is not the problem; autovivification will create the references: perl -MData::Dumper -le '$c->[0]{a}; print Dumper $c' But that is the problem. Autovivification should not happen for r-values, only l-values. -- Just my 0.0002 million

Re: Use of uninitialized value in print at...

2010-06-06 Thread Chas. Owens
On Sun, Jun 6, 2010 at 08:19, Shawn H Corey wrote: > On 10-06-05 03:26 PM, Bryan Harris wrote: >> >> [console] >> $ perl -e 'use warnings; $c=undef; printf("%s", $c->[0]{dog})' >> Use of uninitialized value in printf at -e line 1. >> [/con

Re: Use of uninitialized value in print at...

2010-06-06 Thread Shawn H Corey
On 10-06-05 03:26 PM, Bryan Harris wrote: [console] $ perl -e 'use warnings; $c=undef; printf("%s", $c->[0]{dog})' Use of uninitialized value in printf at -e line 1. [/console] Anything that can help me here? I wish it'd say: Use of uninitialized value $c->

Re: Use of uninitialized value in print at...

2010-06-06 Thread Bryan Harris
> On Thursday 03 Jun 2010 19:53:48 Bryan R Harris wrote: >> Seems like the first time I run a new script I *always* get an error >> message something like this: >> >> "Use of uninitialized value in printf at /Users/harrisb/Library/perl/matc >> line 4

Re: Use of uninitialized value in print at...

2010-06-03 Thread Shlomi Fish
On Thursday 03 Jun 2010 19:53:48 Bryan R Harris wrote: > Seems like the first time I run a new script I *always* get an error > message something like this: > > "Use of uninitialized value in printf at /Users/harrisb/Library/perl/matc > line 414." > > The

Use of uninitialized value in print at...

2010-06-03 Thread Bryan R Harris
Seems like the first time I run a new script I *always* get an error message something like this: "Use of uninitialized value in printf at /Users/harrisb/Library/perl/matc line 414." The problem is usually I'm printing several things, so I have no idea which variable wasn

Re: Warning: Use of uninitialized value

2010-02-01 Thread Rob Dixon
Bob Williams wrote: "Uri Guttman" wrote: "BW" == Bob Williams writes: BW> Hi Rob, Many thanks. That does what I want :) Now I need to study BW> your code to learn why. and you need to learn to bottom post. you wrote one line and quoted 80 lines which have already been seen by others. goo

Re: Warning: Use of uninitialized value

2010-02-01 Thread Bob Williams
"Uri Guttman" wrote: >> "BW" == Bob Williams writes: > > BW> Hi Rob, Many thanks. That does what I want :) Now I need to study > BW> your code to learn why. > > and you need to learn to bottom post. you wrote one line and quoted 80 > lines which have already been seen by others. google

Re: Warning: Use of uninitialized value

2010-01-31 Thread Uri Guttman
> "7" == 7 <7stud.7s...@gmail.com> writes: 7> On Sat, Jan 30, 2010 at 4:27 PM, Rob Dixon wrote: >> Why are you replying to me? My post did use the three-argument form of >> open(). Also: >> >> - It is bad form to use upper case letters for lexical variables >> 7> "Perl Best

Re: Warning: Use of uninitialized value

2010-01-30 Thread 7
On Sat, Jan 30, 2010 at 4:27 PM, Rob Dixon wrote: > Why are you replying to me? My post did use the three-argument form of > open(). Also: > > - It is bad form to use upper case letters for lexical variables > "Perl Best Practices" disagrees with you. > - Passing / / as the first parameter of

Re: Warning: Use of uninitialized value

2010-01-30 Thread Uri Guttman
> "BW" == Bob Williams writes: BW> Hi Rob, Many thanks. That does what I want :) Now I need to study BW> your code to learn why. and you need to learn to bottom post. you wrote one line and quoted 80 lines which have already been seen by others. google for bottom posting and learn why it

Re: Warning: Use of uninitialized value

2010-01-30 Thread Bob Williams
name[0]; > > > > Bob Williams wrote: >> Hi, >> >> I am trying to split the lines in a file into two halves (at the first >> space) each half going into an array. The code I have written is below. >> The print command is there to test that

Re: Warning: Use of uninitialized value

2010-01-30 Thread John W. Krahn
[ Please do not top post. ] 7 wrote: a) open (BHF_FILE, " The modern way to open a file is to: 1) Use the three argument form of open(). 2) Create a variable for the file handle. open (my $BHF_FILE, '<', '/home/bob/tmp/md4music'); You should *always* verify that the file was opened correct

Re: Warning: Use of uninitialized value

2010-01-30 Thread Rob Dixon
Why are you replying to me? My post did use the three-argument form of open(). Also: - It is bad form to use upper case letters for lexical variables - Passing / / as the first parameter of split() will split on the first single space in the string. It is better to use ' ' instead which dis

Re: Warning: Use of uninitialized value

2010-01-30 Thread 7
um, $fields[0]; >push @uktrackname, $fields[1]; > } > > print $ukchecksum[0]; > print $uktrackname[0]; > > > > Bob Williams wrote: >> Hi, >> >> I am trying to split the lines in a file into two halves (at the first >> space) each half going

Re: Warning: Use of uninitialized value

2010-01-30 Thread Rob Dixon
t $uktrackname[0]; Bob Williams wrote: Hi, I am trying to split the lines in a file into two halves (at the first space) each half going into an array. The code I have written is below. The print command is there to test that things worked correctly, but it only gives an error for each instan

Re: AW: Warning: Use of uninitialized value

2010-01-30 Thread Jim Gibson
At 7:29 PM + 1/29/10, Bob Williams wrote: Thanks. There's a lot in your version for a newbie to learn, but unfortunately, it still gives the same error :( It helps if you post the actual code generating the error. You should also trim the accumulated text to remove non-relevant portions.

Re: AW: Warning: Use of uninitialized value

2010-01-30 Thread Bob Williams
work with the data while looping > # over it > > print "Checksum: $checksum\n"; > print "Rest: $song\n"; > > # and stash it away so we can use it later > # ...each song (key) has a checksum > > $music_store{ $song } = $checksu

Re: AW: Warning: Use of uninitialized value

2010-01-29 Thread Steve Bertrand
Thomas Bätzler wrote: > Bob Williams asked: >> I am trying to split the lines in a file into two halves (at the first >> space) each half going into an array. The code I have written is below. > >> ---Code--- >> #!/usr/bin/perl >> use warnings; >> #use strict; > > use strict; # unless you know w

Re: Warning: Use of uninitialized value

2010-01-28 Thread Bob Williams
e to test that things worked correctly, but it >> only gives an error for each instance of the print command... >> >> Use of uninitialized value within @uktrackname in print at >> /home/bob/Documents/scripts/perl/music_md5_compare.pl line 22 >> (#1) &g

Re: Warning: Use of uninitialized value

2010-01-28 Thread John W. Krahn
print command... Use of uninitialized value within @uktrackname in print at /home/bob/Documents/scripts/perl/music_md5_compare.pl line 22 (#1) ---Code--- #!/usr/bin/perl use warnings; #use strict; You shouldn't comment out that line. Strictures can help you find mistakes in your

AW: Warning: Use of uninitialized value

2010-01-28 Thread Thomas Bätzler
Bob Williams asked: > I am trying to split the lines in a file into two halves (at the first > space) each half going into an array. The code I have written is below. > ---Code--- > #!/usr/bin/perl > use warnings; > #use strict; use strict; # unless you know what you're doing. > #use diagnostic

Warning: Use of uninitialized value

2010-01-28 Thread Bob Williams
Hi, I am trying to split the lines in a file into two halves (at the first space) each half going into an array. The code I have written is below. The print command is there to test that things worked correctly, but it only gives an error for each instance of the print command... Use of

RE: suppressing Use of uninitialized value in pattern match (m//)

2009-06-08 Thread Ajay Kumar
Just redirect in some temporary file Like Open STDERR,">/den/null"; That's it -Original Message- From: Noah Garrett Wallach [mailto:djb...@sffun.org] On Behalf Of admin2 Sent: Thursday, May 28, 2009 5:38 AM To: Perl Beginners Subject: suppressing Use of uninitialize

Re: suppressing Use of uninitialized value in pattern match (m//)

2009-05-28 Thread Dr.Ruud
admin2 wrote: How can I suppress the first "Use of uninitialized value in pattern match (m//)" warning message. code and output are below. Don't suppress a message, but fix the problem. my @files = <*> unless /.mbox^/; This is the only pattern match in your script

suppressing Use of uninitialized value in pattern match (m//)

2009-05-28 Thread admin2
How can I suppress the first "Use of uninitialized value in pattern match (m//)" warning message. code and output are below. code # cat ./fix_archive.pl #!/usr/bin/perl use warnings; use strict; my @files = <*> unless /.mbox^/; foreach my $file (@files) {

Re: suppressing Use of uninitialized value in pattern match (m//)

2009-05-27 Thread John W. Krahn
admin2 wrote: How can I suppress the first "Use of uninitialized value in pattern match (m//)" warning message. code and output are below. code # cat ./fix_archive.pl #!/usr/bin/perl use warnings; use strict; my @files = <*> unless /.mbox^/; That line read

suppressing Use of uninitialized value in pattern match (m//)

2009-05-27 Thread admin2
How can I suppress the first "Use of uninitialized value in pattern match (m//)" warning message. code and output are below. code # cat ./fix_archive.pl #!/usr/bin/perl use warnings; use strict; my @files = <*> unless /.mbox^/; foreach my $file (@files) { p

RE: Use of uninitialized value in concatenation (.) or string

2008-07-25 Thread Thomas Bätzler
luke devon <[EMAIL PROTECTED]> asked: > Following error i am getting while its functioning. Could you > please help me to find out what the error is ? > > Use of uninitialized value in concatenation (.) or string at > /xxx.pl line 18, line 1. > Use of uninitialize

Use of uninitialized value in concatenation (.) or string

2008-07-25 Thread luke devon
Dear Friends, Following error i am getting while its functioning. Could you please help me to find out what the error is ? Use of uninitialized value in concatenation (.) or string at /xxx.pl line 18, line 1. Use of uninitialized value in concatenation (.) or string at /xxx.pl line 21

Re: use of uninitialized value in subroutine entry at ~~ line 12

2008-06-26 Thread John W. Krahn
koonom wrote: #!/usr/bin/perl -w use LWP::Simple; use HTML::LinkExtor; $URL = get("http//www.nytimes.com"); #open (FILE, ">file.txt"); $LinkExtor = HTML::LinkExtor->new(\&link); Jeff already pointed out your error here^^. $LinkExtor->parse($URL); sub links { ($tag, %links) = @_;

Re: use of uninitialized value in subroutine entry at ~~ line 12

2008-06-26 Thread Jeff Peng
new(\&link); which should be: new(\&links); Please add "use strict" at the top of the script. On Thu, Jun 26, 2008 at 2:06 PM, koonom <[EMAIL PROTECTED]> wrote: > and then comes the error:use of uninitialized value in subroutine > entry at ~~ line 12 > what does it mean actually? -- Jeff Pe

use of uninitialized value in subroutine entry at ~~ line 12

2008-06-26 Thread koonom
#!/usr/bin/perl -w use LWP::Simple; use HTML::LinkExtor; $URL = get("http//www.nytimes.com"); #open (FILE, ">file.txt"); $LinkExtor = HTML::LinkExtor->new(\&link); $LinkExtor->parse($URL); sub links { ($tag, %links) = @_; if ($tag eq "a"){ foreach $key (keys %links){

Use of uninitialized value at C:\Perl\bin/lwp-download line 171

2008-06-11 Thread bdy120602
I'm using lwp-download from the comand line to download a PDF file from a site, and I'm receiving an error: Use of "uninitialized value at C:\Perl\bin/lwp-download line 171." I also receive the same message when I'm downloading a gif or jpg Thanks, -- To unsubscribe,

Re: Use of uninitialized value in numeric ne error

2007-12-22 Thread yitzle
On 12/22/07, patmarbidon <[EMAIL PROTECTED]> wrote: > or under win32 > while ( $line eq "99\r\n" ){ I /think/, under Perl, "\n" is the system newline, regardless of the OS. Under Windows, it would still be "99\n" -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Re: Use of uninitialized value in numeric ne error

2007-12-21 Thread patmarbidon
x27; . If you removed the "\n" ou "\r\n" while ( $line eq "99" ){ or while ( $line eq "99\n" ){ or under win32 while ( $line eq "99\r\n" ){ lerameur a écrit : Hello and cheers to all, I wrote a small program and it does work, but I get this

Re: Use of uninitialized value in numeric ne error

2007-12-21 Thread Dan Klose
On 21 Dec 2007, at 10:43, lerameur wrote: Hello and cheers to all, hello I wrote a small program and it does work, but I get this error message every tim I run the script: Use of uninitialized value in numeric ne (!=) at ./reverse_string.pl line 11. basically it is a menu and when the user

Re: Use of uninitialized value in numeric ne error

2007-12-21 Thread yitzle
I'd guess $line is never set before the first time it is compared to 99. Either (1) change line 11 to: $line = 0; while ( $line != 99){ or (2) use a do-while loop. do { ... } while ( $line != 99); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Use of uninitialized value in numeric ne error

2007-12-21 Thread lerameur
Hello and cheers to all, I wrote a small program and it does work, but I get this error message every tim I run the script: Use of uninitialized value in numeric ne (!=) at ./reverse_string.pl line 11. basically it is a menu and when the user type 99 as a choice, the program ends line 11 is

Re: Use of uninitialized value in numeric eq (==)

2007-12-13 Thread Paul Lalli
On Dec 12, 9:45 pm, [EMAIL PROTECTED] (Dr.Ruud) wrote: > protoplasm schreef: > > > foreach (keys %opts_hash) > > { > > if ( !defined $opts_hash{$_} ) > > { > > next; > > } > > elsif ( $opts_hash{$_} == 1 ) > > { > > print "$_ = $opts_hash{$_}\n"; > > } > > } > > An alternative w

Re: Use of uninitialized value in numeric eq (==)

2007-12-12 Thread Dr.Ruud
protoplasm schreef: > foreach (keys %opts_hash) > { > if ( !defined $opts_hash{$_} ) > { > next; > } > elsif ( $opts_hash{$_} == 1 ) > { > print "$_ = $opts_hash{$_}\n"; > } > } An alternative way to write that: for (sort keys %opts_hash) { next unless defined $opts_hash

Re: Use of uninitialized value in numeric eq (==)

2007-12-12 Thread protoplasm
Thanks for the advice. After I posted I tried this and it worked too: foreach (keys %opts_hash) { # This next line of code eliminates the "Use of uninitialized value in # numeric eq (==)" error when 'use warnings;' is enabled. if (

Re: Use of uninitialized value in numeric eq (==)

2007-12-12 Thread John W . Krahn
way that will not autovivify all the keys is: GetOptions( \my %opts_hash, 'allTests', 'CbcDec', 'CbcEnc', 'CfbDec', 'CfbEnc', 'CtrDec', 'CtrEnc', 'EcbDec', 'EcbEnc', 'OfbDec', 'OfbEnc',

Re: Use of uninitialized value in numeric eq (==)

2007-12-12 Thread Chas. Owens
On Dec 11, 2007 7:53 PM, protoplasm <[EMAIL PROTECTED]> wrote: snip > my $opts_hash; > my %opts_hash = (); snip You don't need $opts_hash (you aren't using it). You can get rid of the undef warnings by making sure that the keys in %opts_hash are used like this: #default values for the options my

Use of uninitialized value in numeric eq (==)

2007-12-12 Thread protoplasm
each (keys %opts_hash) { if ( $opts_hash{$_} == 0 ) { next; } elsif ( $opts_hash{$_} == 1 ) { print "$_ = $opts_hash{$_}\n"; } } ========== naiad:~/workspace $ ./debug2.pl --CbcDec Use of unini

  1   2   3   >