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
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
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
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
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.
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: $!;
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
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
[ 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
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
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
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
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; #
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
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
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
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
17 matches
Mail list logo