Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread DBSMITH
yes I agree I was a little ambiguous... I was in a hurry. sorry. Anyway here is my updated code. and here is a sample output: My goal is to get all F01 which I am but I am having issues capturing all of these values into my array. When I run the I get the data I want to see which is just the F01

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: yes I agree I was a little ambiguous... I was in a hurry. sorry. Anyway Then do it at a later time and do it right, I imagine most all of us are busy also :) here is my updated code. and here is a sample output: My goal is to get all F01 which I am but I am having issues

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread Ing. Branislav Gerzo
JupiterHost.Net [JN], on Wednesday, April 27, 2005 at 08:15 (-0500) thoughtfully wrote the following: >> 5> my @fa =(); >> 6> my @ha =(); JN> my @fa; JN> my @ha; JN> the = () isn't necessary and doesn't keep you from getting uninitialized JN> value warnings like you think it does, thats only scal

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread Jay Savage
On 4/27/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > yes I agree I was a little ambiguous... I was in a hurry. sorry. Anyway > here is my updated code. and here is a sample output: > My goal is to get all F01 which I am but I am having issues capturing all > of these values into my array. W

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread Ing. Branislav Gerzo
Jay Savage [JS], on Wednesday, April 27, 2005 at 10:26 (-0400) thoughtfully wrote the following: JS> If all you want is the last column, this is a really long way to go about it. JS> while () { JS> print (split)[7]; JS> print "\n"; JS> } (split)[-1] is better, not ? -- How

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread JupiterHost.Net
If all you want is the last column, this is a really long way to go about it. while () { print (split)[7]; print "\n"; } I think that won't work due to some rows formatted like so: 2005/01/20 15:39 17 2% -il-o-b- - - - - sg F01000 unless that was typo? In that case "7" is

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread JupiterHost.Net
Ing. Branislav Gerzo wrote: JupiterHost.Net [JN], on Wednesday, April 27, 2005 at 08:15 (-0500) thoughtfully wrote the following: 5> my @fa =(); 6> my @ha =(); JN> my @fa; JN> my @ha; JN> the = () isn't necessary and doesn't keep you from getting uninitialized JN> value warnings like you think it

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread Jay Savage
On 4/27/05, Ing. Branislav Gerzo <[EMAIL PROTECTED]> wrote: > Jay Savage [JS], on Wednesday, April 27, 2005 at 10:26 (-0400) > thoughtfully wrote the following: > > JS> If all you want is the last column, this is a really long way to go about > it. > JS> while () { > JS> print (split)

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread Jay Savage
On 4/27/05, JupiterHost.Net <[EMAIL PROTECTED]> wrote: > > > If all you want is the last column, this is a really long way to go about > > it. > > > > while () { > > print (split)[7]; > > print "\n"; > > } > > I think that won't work due to some rows formatted like so: > > 2

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread JupiterHost.Net
I was assuming it was a typo/email munge, and that the command he pipes actually produces consistent output. That may be a faulty assumption on my part. YOu know what they say about assumptions In Its hard to say Derek doesn't give us much to work with :) general, though, when parsing log files (

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread DBSMITH
04/27/2005 11:13 cc AM Subject Re: REGEXP removing - il- - -b-f

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread DBSMITH
To beginners@perl.org 04/27/2005 12:03 cc PM

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: yes that is true, [5,6,7] need to be typed otherwise all entries are not Yes what is true? Please reply inline. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread DBSMITH
PM Subject Re: REGEXP removing - il- - -b-f a

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread DBSMITH
cc PM Subject Re: REGEXP removing - il- - -b-f a

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread John W. Krahn
[EMAIL PROTECTED] wrote: yes I agree I was a little ambiguous... I was in a hurry. sorry. Anyway here is my updated code. and here is a sample output: My goal is to get all F01 which I am but I am having issues capturing all of these values into my array. When I run the I get the data I want to s

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread John W. Krahn
JupiterHost.Net wrote: [EMAIL PROTECTED] wrote: yes I agree I was a little ambiguous... I was in a hurry. sorry. Anyway Then do it at a later time and do it right, I imagine most all of us are busy also :) here is my updated code. and here is a sample output: My goal is to get all F01 which I am

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread John W. Krahn
Jay Savage wrote: 4> open (V4, "samcmd v4 2>\&1 |" ) || die "unable to open pipe... Broken?$!"; Don't do this. the precedence of || is too high. your code attempts to open a pipe, and if it can't, then it attempts to open "die..." and starts throwing exceptions. No, that is NOT what happens,

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread Ing. Branislav Gerzo
JupiterHost.Net [JN], on Wednesday, April 27, 2005 at 10:23 (-0500) thinks about: JN> No its not, you can if you want but it pointless: I read it somewhere (it was perl cookbook/learning perl from o'reilly maybe). Always declare my @a = ( ); And here is why, if I remember correctly - if you dec

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread JupiterHost.Net
You do realize that the characters 'F', '0' and '1' are included in the character class \w which split() is removing? :-) yeah I realized that typo too late :), I meant \s not \w but then plain old my @tmp = split; is even better :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread John W. Krahn
Ing. Branislav Gerzo wrote: JupiterHost.Net [JN], on Wednesday, April 27, 2005 at 10:23 (-0500) thinks about: JN> No its not, you can if you want but it pointless: I read it somewhere (it was perl cookbook/learning perl from o'reilly maybe). Always declare my @a = ( ); And here is why, if I remembe

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread DBSMITH
To Perl Beginners 04/27/2005 05:24 cc PM

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread John W. Krahn
[EMAIL PROTECTED] wrote: I will answer and ask all questions in one email! k. 8>foreach () { Is there any good reason to slurp the entire file into memory? What would you suggest? I want to read the entire file via a filehandle. I have plenty of system memory, therefore why not? Why not

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread Ing. Branislav Gerzo
John W. Krahn [JWK], on Wednesday, April 27, 2005 at 17:29 (-0700) has on mind: JWK> "my @a;" creates the lexical variable @a at compile time and since it has just JWK> been created it will be empty. "my @a = ();" creates the variable during JWK> compilation but the assignment (IIRC) has to be d

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-28 Thread Ing. Branislav Gerzo
[EMAIL PROTECTED] [D], on Wednesday, April 27, 2005 at 12:55 (-0400) wrote the following: D> But I do not understand what the (split)[-1] is saying? please explain. it gets last splitted value from the list. (split)[0] #get the first splitted value (split)[0,1] #get first and second splitted v

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-28 Thread JupiterHost.Net
(really beginners) could think "@a" will empty array, which is not true. yes it is true, they are both empty lists: perl -mstrict -MData::Dumper -we 'my @x;my @y = ();print Dumper [EMAIL PROTECTED], [EMAIL PROTECTED];' Show me any difference in @x and @y :) Its about when and how its handled and

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-28 Thread Ing. Branislav Gerzo
JupiterHost.Net [JN], on Thursday, April 28, 2005 at 09:11 (-0500) contributed this to our collective wisdom: >> (really beginners) could think "@a" will empty array, which is not >> true. JN> yes it is true, they are both empty lists: @a will not empty array, here it is: my @a = q{foo bar}; @a

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-28 Thread JupiterHost.Net
Ing. Branislav Gerzo wrote: JupiterHost.Net [JN], on Thursday, April 28, 2005 at 09:11 (-0500) contributed this to our collective wisdom: (really beginners) could think "@a" will empty array, which is not true. JN> yes it is true, they are both empty lists: @a will not empty array, here it is: I

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-28 Thread Jay Savage
On 4/27/05, John W. Krahn <[EMAIL PROTECTED]> wrote: > Jay Savage wrote: > > > > 4> open (V4, "samcmd v4 2>\&1 |" ) || die "unable to open pipe... > > Broken?$!"; > > > > Don't do this. the precedence of || is too high. your code attempts > > to open a pipe, and if it can't, then it attempts

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-28 Thread John W. Krahn
Jay Savage wrote: On 4/27/05, John W. Krahn <[EMAIL PROTECTED]> wrote: Jay Savage wrote: 4> open (V4, "samcmd v4 2>\&1 |" ) || die "unable to open pipe... Broken?$!"; Don't do this. the precedence of || is too high. your code attempts to open a pipe, and if it can't, then it attempts to open "

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-29 Thread John W. Krahn
Ing. Branislav Gerzo wrote: JupiterHost.Net [JN], on Thursday, April 28, 2005 at 09:11 (-0500) contributed this to our collective wisdom: (really beginners) could think "@a" will empty array, which is not true. JN> yes it is true, they are both empty lists: @a will not empty array, here it is: my @

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-29 Thread DBSMITH
PM Subject Re: REGEXP removing - il- - -b-f a

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-29 Thread Ing. Branislav Gerzo
[EMAIL PROTECTED] [D], on Friday, April 29, 2005 at 08:43 (-0400) thoughtfully wrote the following: D>So which is safer more ideal to use : || , or I think "or" is better - it makes perl language more readable for beginners. -- How do you protect mail on web? I use http://www.2pu.net [Join t

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-29 Thread DBSMITH
cc AM Subject Re: REGEXP removing - il- - -b-f a

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-29 Thread Ing. Branislav Gerzo
[EMAIL PROTECTED] [D], on Friday, April 29, 2005 at 09:30 (-0400) wrote about: DOc> well, I am trying to get beyond a beginner as I have doing Perl for 3 DOc> years now so is your answer still the same? I think really good programmers write "nice" readable programs (scripts), so begginers should

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-29 Thread Peter Rabbitson
> I think really good programmers write "nice" readable programs > (scripts), so begginers should understand that sooner. I think, that's > why better using "or" instead "||". Come-on guys! Read your mails. John Krahn spent the time to write a wonderful explanation why || simply DOES NOT WORK when

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-29 Thread John Doe
Am Freitag, 29. April 2005 14.43 schrieb [EMAIL PROTECTED]: > So which is safer more ideal to use : || , or > > > Derek B. Smith > OhioHealth IT > UNIX / TSM / EDM Teams [...] The only difference between "||" and "or" is the precedence, and the precedence of "=" lies between them. To my unders

RE: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-29 Thread Manav Mathur
|-Original Message- |From: Ing. Branislav Gerzo [mailto:[EMAIL PROTECTED] |Sent: Friday, April 29, 2005 7:11 PM |To: beginners@perl.org |Subject: Re: REGEXP removing - il- - -b-f and - il- - - - f | | |[EMAIL PROTECTED] [D], on Friday, April 29, 2005 at 09:30 (-0400) |wrote about

RE: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-29 Thread Larsen, Errin M HMMA/IT
> -Original Message- > From: John Doe [mailto:[EMAIL PROTECTED] > Sent: Friday, April 29, 2005 8:50 AM > To: beginners@perl.org > Subject: Re: REGEXP removing - il- - -b-f and - il- - - - f > > > Am Freitag, 29. April 2005 14.43 schrieb [EMAIL PROTECTED]: &g

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-29 Thread Jay Savage
On 4/28/05, John W. Krahn <[EMAIL PROTECTED]> wrote: > Jay Savage wrote: > > On 4/27/05, John W. Krahn <[EMAIL PROTECTED]> wrote: > > > >>Jay Savage wrote: > >> > >>>4> open (V4, "samcmd v4 2>\&1 |" ) || die "unable to open pipe... > >>>Broken?$!"; > >>> > >>>Don't do this. the precedence of |

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-29 Thread John W. Krahn
Peter Rabbitson wrote: I think really good programmers write "nice" readable programs (scripts), so begginers should understand that sooner. I think, that's why better using "or" instead "||". Come-on guys! Read your mails. John Krahn spent the time to write a wonderful explanation why || simply D

Re: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-29 Thread John W. Krahn
Jay Savage wrote: [big snip] I will admit that my response to OP didn't take into account that, in his particular case, the argument to open was a literal and "||" was being evaluated at compile time. But the fact remains that it is simply and demonstrably not true that open will never attempt to

Question about || (was REGEXP removing - il- - -b-f and - il- - - - f)

2005-04-27 Thread Peter Rabbitson
> also > "or die" is more preferable than "|| die" Why is that? :) I was actually going to post a question about ambiguity syntax later, but here it is anyway. Are the following 4 equivalent? 1) if ($b) { $a = $b; } else { $a = $c; } 2) $a = $b or $c; 3) $a = $b || $c; 4) $a = $b ? $b : $

Re: Question about || (was REGEXP removing - il- - -b-f and - il- - - - f)

2005-04-27 Thread Ing. Branislav Gerzo
Peter Rabbitson [PR], on Wednesday, April 27, 2005 at 09:06 (-0500) has on mind: PR> Why is that? :) I was actually going to post a question about ambiguity PR> syntax later, but here it is anyway. Are the following 4 equivalent? to mee it seems so. PR> local ($/); PR> ,I have no idea how it un

Re: Question about || (was REGEXP removing - il- - -b-f and - il- - - - f)

2005-04-27 Thread Offer Kaye
On 4/27/05, Peter Rabbitson wrote: > > also > > "or die" is more preferable than "|| die" > > Why is that? :) It's a question of style, it is not better as in "the code will work better". It is mentioned in "perldoc perlstyle" that it is preferable to use "or" and "and" instead of "||" and "&&".

Re: Question about || (was REGEXP removing - il- - -b-f and - il- - - - f)

2005-04-27 Thread Jay Savage
On 4/27/05, Peter Rabbitson <[EMAIL PROTECTED]> wrote: > > also > > "or die" is more preferable than "|| die" > > Why is that? :) I was actually going to post a question about ambiguity > syntax later, but here it is anyway. Are the following 4 equivalent? > No. > 1) > if ($b) { > $a = $b; >

Re: Question about || (was REGEXP removing - il- - -b-f and - il- - - - f)

2005-04-27 Thread Peter Rabbitson
On Wed, Apr 27, 2005 at 09:06:39AM -0500, Peter Rabbitson wrote: > Also there was an example on the web that completely threw me off. Although > this works: > > local ($/); > Sorry about this last one, I undrestand the idea of local for globs, I just thought that local $/; and local ($/); d