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: Uninitialized Value, but It Isn't, so Why?

2017-03-02 Thread Chas. Owens
On Thu, Mar 2, 2017, 19:32 Shawn H Corey wrote: > On Thu, 2 Mar 2017 16:35:17 -0600 > Andy Bach wrote: > > Hah! "undef" is an uninitialized value ! > > $ perl -we 'if (not $interdest5) {$interdest5 = "";} print > "|$interdest5|\n"' &g

Re: Uninitialized Value, but It Isn't, so Why?

2017-03-02 Thread Shawn H Corey
s it's "false" > > perl -we 'if (undef $interdest5) {$interdest5 = "";} print > "$interdest5\n"' Use of uninitialized value $interdest5 in > concatenation (.) or string at -e line 1. > > $ perl -we 'if (undef $interdest5) {$in

Re: Uninitialized Value, but It Isn't, so Why?

2017-03-02 Thread Andy Bach
t;undef" is a value ... not sure why you don't get a syntax error there but, most likely, the if quits at seeing "undef" as it's "false" perl -we 'if (undef $interdest5) {$interdest5 = "";} print "$interdest5\n"' Use of uninitial

Re: Uninitialized Value, but It Isn't, so Why?

2017-03-02 Thread Shawn H Corey
On Thu, 2 Mar 2017 12:29:42 -0600 Danny Spell wrote: > Line 57 is "last if ($interdest5 ne "");". > > Why does Perl say it is uninitialized ? > I thought I took care of that in two places. Once when it was > declared and and again within the loop. Because you assign it a value in this statement

Uninitialized Value, but It Isn't, so Why?

2017-03-02 Thread Danny Spell
turned on. When I execute this script, I get this message. *Use of uninitialized value $interdest5 in string ne at test2.pl <http://test2.pl> line 57 (#1)* Line 57 is "last if ($interdest5 ne "");". Why does Perl say it is uninitialized ? I thought I took care of tha

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)
Hi, I don't need XML::Writer, I corrected the spelling of Writer. Yes, I can produce an XML file. tags are always found. tags are found for every , so for all closing tags. I thought that this erronous maching is the result of an uninitialized value of $j or $j2. As I can print $j2,

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: uninitialized value $cwd_untainted in chdir at /usr/local/lib/perl5/5.10.0/File/Find.pm

2013-06-26 Thread Shlomi Fish
Hi Piyush, On Wed, 26 Jun 2013 18:47:08 +0530 Piyush Verma <114piy...@gmail.com> wrote: > Hi Guys, > > I need some help. > I am running some code using command line and code is running fine. > This command line is very big so I have written shell script for that which > takes input and create th

uninitialized value $cwd_untainted in chdir at /usr/local/lib/perl5/5.10.0/File/Find.pm

2013-06-26 Thread Piyush Verma
Hi Guys, I need some help. I am running some code using command line and code is running fine. This command line is very big so I have written shell script for that which takes input and create this command line. Till here no problem code is running nicely. I have written one more script in pytho

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: uninitialized value

2011-12-07 Thread Chris Stinemetz
Thanks John and Ken. Your advice helped me figure out the problem. Take care, Chris

Re: uninitialized value

2011-12-07 Thread John W. Krahn
es I would make: Use of uninitialized value in numeric eq (==) at ./evdo.pl line 126,<$FIN> line 1. Use of uninitialized value in numeric lt (<) at ./evdo.pl line 126,<$FIN> line 1. 111 while(my $line =<$FIN>) { ADD: next unless $line =~ /;/; 11

RE: uninitialized value

2011-12-07 Thread Ken Slater
> -Original Message- > From: Chris Stinemetz [mailto:chrisstinem...@gmail.com] > Sent: Wednesday, December 07, 2011 4:11 PM > To: beginners@perl.org > Subject: uninitialized value > > after converting an older Perl script to using strict pragma I am > getting

uninitialized value

2011-12-07 Thread Chris Stinemetz
after converting an older Perl script to using strict pragma I am getting the follow error: I can't seem to figure out how to resolve this. I'm in hopes that there is someone that can let me know what I am missing? Thank you in advance! Chris Use of uninitialized value in numeric

Re: Uninitialized value in concatenation

2011-06-08 Thread Jim Gibson
On 6/8/11 Wed Jun 8, 2011 5:33 PM, "Sayth Renshaw" scribbled: >> That looks fine, but Perl is trying to interpolate $mynames (which >> hasn't been initalised) into the string instead of indexing an element >> of @mynames. >> >> You may be running an old perl. Please check your version with >>

Re: Uninitialized value in concatenation

2011-06-08 Thread Sayth Renshaw
> That looks fine, but Perl is trying to interpolate $mynames (which > hasn't been initalised) into the string instead of indexing an element > of @mynames. > > You may be running an old perl. Please check your version with > >  perl -v I have 5.12.3 on this PC, The strawberry perl release. > > a

Re: Uninitialized value in concatenation

2011-06-08 Thread Cortello
ta::Dumper; my @mynames = qw/fred betty barney dino wilma pebbles bamm-bamm/; print " Enter a number from 1 to 7: "; chomp(my @nums =); foreach (@nums) { print "$mynames[ $_ - 1 ]\n"; } The error: C:\MyPerl>perl ch3_2.pl Enter a number from 1 to 7: 2 ^Z

Re: Uninitialized value in concatenation

2011-06-08 Thread Rob
ta::Dumper; my @mynames = qw/fred betty barney dino wilma pebbles bamm-bamm/; print " Enter a number from 1 to 7: "; chomp(my @nums =); foreach (@nums) { print "$mynames[ $_ - 1 ]\n"; } The error: C:\MyPerl>perl ch3_2.pl Enter a number from 1 to 7: 2 ^Z

Re: Uninitialized value in concatenation

2011-06-08 Thread Sayth Renshaw
> Hello Sayth > > The program you have published seems to work fine. Are you certain that > the print line inside the foreach loop is as you say? > > Rob > This is copied direct from my editor. #!/usr/bin/perl use strict; use warnings; use Data::Dumper; my @mynames = qw/fred betty barney dino wi

Uninitialized value in concatenation

2011-06-08 Thread Sayth Renshaw
rney dino wilma pebbles bamm-bamm/; print " Enter a number from 1 to 7: "; chomp(my @nums = ); foreach (@nums) { print "$mynames[ $_ - 1 ]\n"; } The error: C:\MyPerl>perl ch3_2.pl Enter a number from 1 to 7: 2 ^Z Use of uninitialized value $mynames in concatenat

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
ff using an associative array ("hash") for your data. It also makes comparison with track names and checksums from a second list much easier: my %uktrackchecksum; while( my $line = <$bhf_file> ){ my( $track, $checksum ) = split /\s+/, $line; $uktrackchecksum{ $track } = $c

Warning: Use of uninitialized value

2010-01-28 Thread Bob Williams
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; #use diagnostics; # perl script to compare two files of md5 checksums #+and extract the lines which differ open (BHF_FILE

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

  1   2   3   4   5   >