Re: Warning: Use of uninitialized value

2010-02-01 Thread Bob Williams
Uri Guttman wrote: BW == Bob Williams n...@spam.barrowhillfarm.org.uk 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

Re: Warning: Use of uninitialized value

2010-02-01 Thread Rob Dixon
Bob Williams wrote: Uri Guttman wrote: BW == Bob Williams n...@spam.barrowhillfarm.org.uk 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

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 rob.di...@gmx.com 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: AW: Warning: Use of uninitialized value

2010-01-30 Thread Bob Williams
Steve Bertrand wrote: Thomas Bätzler wrote: Bob Williams n...@spam.barrowhillfarm.org.uk 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

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: Warning: Use of uninitialized value

2010-01-30 Thread Rob Dixon
Hi Bob I suggest you forget about regular expressions and use the library function split() instead. Take a look at the code below. HTH, Rob use warnings; use strict; my (@ukchecksum, @uktrackname); open my $bhf_file, '', '/home/bob/tmp/md5music' or die Could not open md5music: $!;

Re: Warning: Use of uninitialized value

2010-01-30 Thread 7
a) open (BHF_FILE, /home/bob/tmp/md5music) 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'); while (my $line = $BHF_FILE) { #do something with $line } close

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

Re: Warning: Use of uninitialized value

2010-01-30 Thread John W. Krahn
[ Please do not top post. ] 7 wrote: a) open (BHF_FILE, /home/bob/tmp/md5music) 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

Re: Warning: Use of uninitialized value

2010-01-30 Thread Bob Williams
Hi Rob, Many thanks. That does what I want :) Now I need to study your code to learn why. Bob Rob Dixon wrote: Hi Bob I suggest you forget about regular expressions and use the library function split() instead. Take a look at the code below. HTH, Rob use warnings; use

Re: Warning: Use of uninitialized value

2010-01-30 Thread Uri Guttman
BW == Bob Williams n...@spam.barrowhillfarm.org.uk 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

Re: Warning: Use of uninitialized value

2010-01-30 Thread 7
On Sat, Jan 30, 2010 at 4:27 PM, Rob Dixon rob.di...@gmx.com 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

Re: AW: Warning: Use of uninitialized value

2010-01-29 Thread Steve Bertrand
Thomas Bätzler wrote: Bob Williams n...@spam.barrowhillfarm.org.uk 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; #

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

AW: Warning: Use of uninitialized value

2010-01-28 Thread Thomas Bätzler
Bob Williams n...@spam.barrowhillfarm.org.uk 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

Re: Warning: Use of uninitialized value

2010-01-28 Thread John W. Krahn
Bob Williams wrote: Hi, Hello, 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

Re: Warning: Use of uninitialized value

2010-01-28 Thread Bob Williams
John W. Krahn wrote: Bob Williams wrote: Hi, Hello, 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