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
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
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
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
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
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
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
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
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 = $
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
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,
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
:" . $j2 . "==" . length 0+@xhtmlend . "\n";
print OUTFILE "ENDFOUND";
$begintagfound = 0;
}
if($doread == 1) {
$n = read FILE, $data, 1;
$buf = $data;
if($begintagfound == 1) {
= 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 {
>
+ 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
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
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
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
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
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
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
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
',
'$ Address',
'$ Province',
'$ Kode_pos',
"$ MSISDN ',
'$ Email',
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
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-
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 =
'01' => '1',
>'02' => '1',
>'03' => '1',
> },
>
> );
>
> my $href = \%data;
> my @wanted = qw(077 078 149);
> my @hours = qw(00 01 02 03 0
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
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
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
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
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
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 =~ /^\"
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
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
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
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
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
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
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
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
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
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
Thanks John and Ken. Your advice helped me figure out the problem.
Take care,
Chris
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
> -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
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
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
>>
> 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
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
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
> 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
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
> "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
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
> "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
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
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
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
>{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}->{&
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
-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
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
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/
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 (
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 =
> 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
>>>>> "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.
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
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
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
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
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
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
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->
> 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
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
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
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
"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
> "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
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
> "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
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
[ 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
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
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
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
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.
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
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
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
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
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
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
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
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
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) {
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
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 - 100 of 401 matches
Mail list logo