Re: `perldoc -f` doesn't work for me

2015-05-25 Thread pierrot
Since "perldoc" and related code is written in perl, you can use a debugger to debug it. You can do: perl -d `which perldoc` -f sort See: * http://perl-begin.org/topics/debugging/ Thank you very much, Shlomi!! I debugged perldoc as you suggested and found the error. Basi

Re: `perldoc -f` doesn't work for me

2015-05-23 Thread Shlomi Fish
Hi Pablo! See below for my response. On Sat, 23 May 2015 03:10:18 -0300 Pablo wrote: > Hi. > > Something really odd is happening to me. For example, if I do `perldoc > -v $_` I get the information about $_ as expected, but whenever I try > `perldoc -f sort` I get this me

`perldoc -f` doesn't work for me

2015-05-23 Thread Pablo
Hi. Something really odd is happening to me. For example, if I do `perldoc -v $_` I get the information about $_ as expected, but whenever I try `perldoc -f sort` I get this message: /No documentation for perl function 'sort' found./ It seems that perldoc doesn't find a

Re: perl like tail -f

2009-10-22 Thread Harry Putnam
When I run it, it doesn't show any errors, and appears to be waiting on the pipe. But no data ever comes out. I used the same sequence as for the earlier script the didn't use File::Tail (posted earlier in this thread). That is. 1) start the script `fltr_sl' shown above 2) To

Re: perl like tail -f

2009-10-20 Thread Peter Scott
On Mon, 19 Oct 2009 23:30:30 -0500, Harry Putnam wrote: > Shawn H Corey writes: > >> http://search.cpan.org/~mgrabnar/File-Tail-0.99.3/Tail.pm > > Thanks that looks useful. Is there a reason why I should use that > module as apposed to the kind of code offered in the faq about tail? > (perldoc

Re: perl like tail -f

2009-10-20 Thread Shawn H Corey
Harry Putnam wrote: > Shawn H Corey writes: > >> http://search.cpan.org/~mgrabnar/File-Tail-0.99.3/Tail.pm > > Thanks that looks useful. Is there a reason why I should use that > module as apposed to the kind of code offered in the faq about > tail? (perldoc -q tail) as suggested by another p

Re: perl like tail -f

2009-10-19 Thread Harry Putnam
Shawn H Corey writes: > http://search.cpan.org/~mgrabnar/File-Tail-0.99.3/Tail.pm Thanks that looks useful. Is there a reason why I should use that module as apposed to the kind of code offered in the faq about tail? (perldoc -q tail) as suggested by another poster (Jim G). I mean, I'm not e

Re: perl like tail -f

2009-10-19 Thread Harry Putnam
Jim Gibson writes: > On 10/19/09 Mon Oct 19, 2009 11:38 AM, "Harry Putnam" > scribbled: > > >> >> I'm not sure what it is about the tail -f command that allows it to >> keep reading over restarts of system logger (on Opensolaris)... but

Re: perl like tail -f

2009-10-19 Thread Jim Gibson
On 10/19/09 Mon Oct 19, 2009 11:38 AM, "Harry Putnam" scribbled: > > I'm not sure what it is about the tail -f command that allows it to > keep reading over restarts of system logger (on Opensolaris)... but > how can I emulate whatever it is.. in perl? > Th

Re: perl like tail -f

2009-10-19 Thread Shawn H Corey
Harry Putnam wrote: > I'm not sure what it is about the tail -f command that allows it to > keep reading over restarts of system logger (on Opensolaris)... but > how can I emulate whatever it is.. in perl? Have you looked at File::Tail http://search.cpan.org/~mgrabnar/File-Tail-

perl like tail -f

2009-10-19 Thread Harry Putnam
at fifo Now restart system logger. Now anything that sys logger produces will be displayed from the cat command. Now restart systemlogger again and cat closes as would a common shell script or awk. However the `tail -f' command will not close... it keeps on reading through rest

Re: How to implement "tail -f" using perl in both windows and linux !

2009-03-24 Thread Chas. Owens
On Tue, Mar 24, 2009 at 10:26, Bob McConnell wrote: snip > As a result, installing a new module on the production server is very > expensive. It must go through our code review and QA testing as well as > being repackaged in the correct format for deployment. It is difficult > to justify this expe

RE: How to implement "tail -f" using perl in both windows and linux !

2009-03-24 Thread Bob McConnell
From: Chas. Owens > On Mon, Mar 23, 2009 at 14:16, Amit Saxena wrote: >> Is it possible to implement this without using any external modules from >> CPAN ? > > The FAQ covers this quite nicely (see below). In general you should > use File::Tail[1]. And on UNIX systems, of course, you can always

Re: How to implement "tail -f" using perl in both windows and linux !

2009-03-23 Thread Chas. Owens
ystems, of course, you can always cheat: #!/usr/bin/perl use strict; use warnings; open my $pipe, "-|", "/usr/bin/tail", "-f", "./file.log" or die "could not start tail on file.log: $!"; print while <$pipe>

Re: [PBML] How to implement "tail -f" using perl in both windows and linux !

2009-03-23 Thread Randal L. Schwartz
> "Amit" == Amit Saxena writes: Amit> Is it possible to implement this without using any external modules from Amit> CPAN ? Is it possible? Yes. Reasonable? No. Please state clearly your confusion about being able to include CPAN modules in your workflow. Hint: none of the reasons you come

How to implement "tail -f" using perl in both windows and linux !

2009-03-23 Thread Amit Saxena
Is it possible to implement this without using any external modules from CPAN ? Thanks & Regards, Amit Saxena

Re: Perl equivalent of "sed -f" or "awk -f"

2008-09-02 Thread [EMAIL PROTECTED]
On Sep 2, 10:49 am, [EMAIL PROTECTED] (John W. Krahn) wrote: > [EMAIL PROTECTED] wrote: > > I'd like to apply a series of inline edits to a file in Perl. > > > With sed, I could use "sed -f commandfile inputfile" or in awk, "awk - > > f commandf

Re: Perl equivalent of "sed -f" or "awk -f"

2008-09-02 Thread John W. Krahn
[EMAIL PROTECTED] wrote: I'd like to apply a series of inline edits to a file in Perl. With sed, I could use "sed -f commandfile inputfile" or in awk, "awk - f commandfile inputfile", however, I could not find an equivalent in Perl. perl commandfile inputfile I&#

RE: Perl equivalent of "sed -f" or "awk -f"

2008-09-02 Thread Andrew Curry
Perl -p -i -e "s/search/replace/;" -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 02 September 2008 15:06 To: beginners@perl.org Subject: Perl equivalent of "sed -f" or "awk -f" I'd like to apply a series of inline ed

Perl equivalent of "sed -f" or "awk -f"

2008-09-02 Thread [EMAIL PROTECTED]
I'd like to apply a series of inline edits to a file in Perl. With sed, I could use "sed -f commandfile inputfile" or in awk, "awk - f commandfile inputfile", however, I could not find an equivalent in Perl. I'd prefer not to use sed or awk as they do not suppor

Re: glob and "-f" mismatch under Windows

2006-12-23 Thread Jen Spinney
On 12/23/06, Ken Foskey <[EMAIL PROTECTED]> wrote: On Thu, 2006-12-21 at 16:45 +, Bryan K. Wright wrote: > Hi folks, > > I'm porting a script to Windows, and I've run into an > odd mismatch between the results returned by "glob" and the > -f op

Re: glob and "-f" mismatch under Windows

2006-12-22 Thread Ken Foskey
On Thu, 2006-12-21 at 16:45 +, Bryan K. Wright wrote: > Hi folks, > > I'm porting a script to Windows, and I've run into an > odd mismatch between the results returned by "glob" and the > -f operator. If I take a test script like the following: >

glob and "-f" mismatch under Windows

2006-12-21 Thread Bryan K. Wright
Hi folks, I'm porting a script to Windows, and I've run into an odd mismatch between the results returned by "glob" and the -f operator. If I take a test script like the following: my @files = glob ("*.exe"); for my $f (@files) { print "Pro

Re: -F vs split

2006-08-25 Thread Tom Phoenix
On 8/25/06, John W. Krahn <[EMAIL PROTECTED]> wrote: See the link in my post for the "bug" report I already filed on this. Ah, I see that it's been fixed (or at least documented). Thanks. --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

Re: -F vs split

2006-08-25 Thread John W. Krahn
Tom Phoenix wrote: > On 8/25/06, Robert Citek <[EMAIL PROTECTED]> wrote: > >> $ echo 'a: b' | perl -F'/: /' -lane 'print join("--", @F)' >> a: b > > For some reason, the space character seems not to match a space > char

Re: -F vs split

2006-08-25 Thread Dr.Ruud
Robert Citek schreef: > Why do these two commands not produce the same output? > > $ perl -le 'print join("--", split(/: /, "a: b"))' > a--b > > $ echo 'a: b' | perl -F'/: /' -lane 'print join("--", @F)'

Re: -F vs split

2006-08-25 Thread Tom Phoenix
On 8/25/06, Robert Citek <[EMAIL PROTECTED]> wrote: $ echo 'a: b' | perl -F'/: /' -lane 'print join("--", @F)' a: b For some reason, the space character seems not to match a space character. I'd call it a bug. Other ways to match a space,

Re: -F vs split

2006-08-25 Thread Robert Citek
t you want: $ echo 'a: b' | perl -F'/:\040/' -lane'print join "--", @F' a--b Thanks, John, that worked for me, too. A less elegant solution I found was to prefilter my input via sed: $ echo 'a: b' | sed -e 's/: /:/g' | perl -F&#

Re: -F vs split

2006-08-25 Thread John W. Krahn
Robert Citek wrote: > > Why do these two commands not produce the same output? > > $ perl -le 'print join("--", split(/: /, "a: b"))' > a--b > > $ echo 'a: b' | perl -F'/: /' -lane 'print join("--", @F)&#x

Re: -F vs split

2006-08-25 Thread Robert Citek
On Aug 25, 2006, at 2:43 PM, Robert Citek wrote: Why do these two commands not produce the same output? $ perl -le 'print join("--", split(/: /, "a: b"))' a--b $ echo 'a: b' | perl -F'/: /' -lane 'print join("--", @F)'

-F vs split

2006-08-25 Thread Robert Citek
Why do these two commands not produce the same output? $ perl -le 'print join("--", split(/: /, "a: b"))' a--b $ echo 'a: b' | perl -F'/: /' -lane 'print join("--", @F)' a: b From reading 'perldoc perlrun'

Re: Leading zero with sprintf and option "f".

2006-07-05 Thread Mumia W.
John Hennessy wrote: [...] I am using %03.4f to provide output that looks like 100. I would like number less than 100. to look like 099. I would like to keep the 3 digits prior to the decimal point either with or without the leading zero as required. Any suggestions welcomed. Than

Re: Leading zero with sprintf and option "f".

2006-07-05 Thread John W. Krahn
John Hennessy wrote: > Hi, how is it possible to prefix a leading zero to the $Count result > below when this value is less than 100. ? > > > while ($count < 110.000) { >$count += 10; >$Count = sprintf "%03.4f", $count; >print "Count is now $Count\n"; > } > > I am using %03.4f to

Leading zero with sprintf and option "f".

2006-07-05 Thread John Hennessy
Hi, how is it possible to prefix a leading zero to the $Count result below when this value is less than 100. ? while ($count < 110.000) { $count += 10; $Count = sprintf "%03.4f", $count; print "Count is now $Count\n"; } I am using %03.4f to provide output that looks like 100.

Re: monitoring file like tail -f in perl

2006-05-29 Thread Xavier Noria
On May 29, 2006, at 18:19, Ken Foskey wrote: I want to monitor a daemon's logs that updates randomly through the day and night. Is there a way to open the log file and read the new records as they come in the same way as tail -f does? Sure, with File::Tail for example. -- fxn

Re: monitoring file like tail -f in perl

2006-05-29 Thread JupiterHost.Net
Ken Foskey wrote: I want to monitor a daemon's logs that updates randomly through the day and night. Is there a way to open the log file and read the new records as they come in the same way as tail -f does? Sure, look on cpan for File::Tail::App and File::Tail -- To unsubscribe, e

monitoring file like tail -f in perl

2006-05-29 Thread Ken Foskey
I want to monitor a daemon's logs that updates randomly through the day and night. Is there a way to open the log file and read the new records as they come in the same way as tail -f does? Thanks Ken -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Re: Emulate "tail -f" on file

2005-05-20 Thread Wiggins d'Anconia
"Because it's up-side down. Why is that? It makes replies harder to read. Why not? Please don't top-post." - Sherm Pendley, Mac OS X list Tielman Koekemoer (TNE) wrote: > > Thanks all for your input. The File::Tail package works although it > seems to stop working once I restart the application

RE: Emulate "tail -f" on file

2005-05-20 Thread Tielman Koekemoer \(TNE\)
pe [mailto:[EMAIL PROTECTED] Sent: 19 May 2005 09:48 AM To: Ramprasad A Padmanabhan Cc: beginners@perl.org Subject: Re: Emulate "tail -f" on file On Thu, May 19, 2005 at 11:54:35AM +0530, Ramprasad A Padmanabhan wrote: > use File::Tail; > > > On Thu, 2005-05-19 at 11:3

Re: Emulate "tail -f" on file

2005-05-19 Thread Chris Knipe
On Thu, May 19, 2005 at 11:54:35AM +0530, Ramprasad A Padmanabhan wrote: > use File::Tail; > > > On Thu, 2005-05-19 at 11:37, Tielman Koekemoer (TNE) wrote: > > Hi All, > > > > If I wanted to monitor a file in a way that would emulate "tail -f" >

Re: Emulate "tail -f" on file

2005-05-18 Thread Offer Kaye
On 5/19/05, Tielman Koekemoer (TNE) wrote: > > Hi All, > > If I wanted to monitor a file in a way that would emulate "tail -f" > (in the shell), how would I open the file? > > open(FILE, " filename |"); (?) > > TIA > http://perldoc.pe

Re: Emulate "tail -f" on file

2005-05-18 Thread Ramprasad A Padmanabhan
use File::Tail; On Thu, 2005-05-19 at 11:37, Tielman Koekemoer (TNE) wrote: > Hi All, > > If I wanted to monitor a file in a way that would emulate "tail -f" > (in the shell), how would I open the file? > > open(FILE,

Emulate "tail -f" on file

2005-05-18 Thread Tielman Koekemoer \(TNE\)
Hi All, If I wanted to monitor a file in a way that would emulate "tail -f" (in the shell), how would I open the file? open(FILE, " filename |"); (?) TIA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http:/

Re: populating a hash with % used as the key and F string as the value

2005-05-04 Thread John Doe
18 09:532 0% -il-o-b- sg F01002 | 4 2005/02/04 16:41 196 100% -il-o-bf sg F01003 | 5 2005/02/05 21:13 305 100% -il-o-bf sg F01004 the % string is not unique over data file, whereas the F... string looks like being unique. and because it seemed to make sense for

Re: populating a hash with % used as the key and F string as the value

2005-05-03 Thread DBSMITH
05/03/2005 12:37 cc AM Subject Re: populating a hash

Re: populating a hash with % used as the key and F string as the value

2005-05-02 Thread John Doe
ly, you wantto build a hash with % > > keys > > > and F... values. This could be done with code like > > > > push @{$lookup_hash{$pct_value}}, $F_value; > > > > eventually, you even want a 2nd level hash with the F field number as > > key, > >

Re: populating a hash with % used as the key and F string as the value

2005-05-02 Thread DBSMITH
> * If the format of all your data lines is "consistent", you could use split > on \s+ to get the data fields instead of a tr/m cascade. > > * Then, if I understand you correctly, you wantto build a hash with % keys > and F... values. This could be done with code lik

Re: populating a hash with % used as the key and F string as the value

2005-05-02 Thread John W. Krahn
John Doe wrote: Am Montag, 2. Mai 2005 03.49 schrieb [EMAIL PROTECTED]: John, the reg exp s <-+> (); ^ was changed to y/sg//;; y/-//d; s{\w+} (); to exclude the spaces and use y... thx why are thre operators y or tr more efficient since these operato

Re: populating a hash with % used as the key and F string as the value

2005-05-02 Thread John W. Krahn
inally I was using an array, actually 2 arrays one with all f string s and one with all % strings. To me it makes more sense to use a hash b/c each F string needs to be pulled with its associative n% string. This is why I want to populate a hash of arrays. Below is what is should of read for my popu

Re: populating a hash with % used as the key and F string as the value

2005-05-02 Thread John Doe
; and such, it can simply take a char after the other and replace it with > another one. So the implementation of the algorithm must be much much > easier. > > > Originally I was using an array, actually 2 arrays one with all f string > > s and one with all % strings. > > To me it

Re: populating a hash with % used as the key and F string as the value

2005-05-02 Thread John Doe
much much easier. > Originally I was using an array, actually 2 arrays one with all f string s > and one with all % strings. > To me it makes more sense to use a hash b/c each F string needs to be > pulled with its associative n% string. > This is why I want to populate a hash of a

Re: populating a hash with % used as the key and F string as the value

2005-05-01 Thread DBSMITH
array, actually 2 arrays one with all f string s and one with all % strings. To me it makes more sense to use a hash b/c each F string needs to be pulled with its associative n% string. This is why I want to populate a hash of arrays. Below is what is should of read for my population of the hash.

Re: populating a hash with % used as the key and F string as the value

2005-05-01 Thread John W. Krahn
[EMAIL PROTECTED] wrote: I was thinking of using a hash of arrays b/c I want to look-up each array by a certain string and that string would the % string. My goal is to populate a hash of some sort with the % string and its associated F string. Here is the data file: 1 2005/01/20 15:39 17

populating a hash with % used as the key and F string as the value

2005-05-01 Thread DBSMITH
I was thinking of using a hash of arrays b/c I want to look-up each array by a certain string and that string would the % string. My goal is to populate a hash of some sort with the % string and its associated F string. Here is the data file: 1 2005/01/20 15:39 17 2% -il-o-b- sg

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

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 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 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 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 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 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 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 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 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
PM Subject Re: REGEXP removing - il- - -b-f a

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-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-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 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 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
(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
[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-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-27 Thread John W. Krahn
and Programming Perl 3rd edition, no where does it say use scaler @fa to get the element count, rather it says use $#fa. Is there something I am unaware of or was $# deprecated recently? Why is scaler @fa better/more correct than $#fa? Because the array in scalar context will always be equal

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

2005-04-27 Thread DBSMITH
better/more correct than $#fa? I have been told that my @a = ( ); is more correct than my @a, but now I am confused b/c others are telling me otherwise??? Personally, I like my @a = ( ); because it lets me know explicitly that this array is now initialized to 0 elements, plus its faster at compile

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 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: [E

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 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 John W. Krahn
; now @last_col has all of the F01... pieces of data. You do realize that the characters 'F', '0' and '1' are included in the character class \w which split() is removing? :-) John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

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

2005-04-27 Thread John W. Krahn
+%).*?(f01\d+)/i or next; print "$percent $f01\n"; } 1 2005/01/20 15:39 17 2% -il-o-b- - - - - sg F01000 2 2005/01/20 15:53 14 1% -il-o-b- sg F01001 3 2005/01/18 09:532 0% -il-o-b- sg F01002 4 2005/02/04 16:41 196 100% -il-o-bf

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 DBSMITH
PM Subject Re: REGEXP removing - il- - -b-f a

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
To beginners@perl.org 04/27/2005 12:03 cc PM

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

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: 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 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: 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: 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: REGEXP removing - il- - -b-f and - il- - - - f

2005-04-27 Thread Jay Savage
k > > 1 2005/01/20 15:39 17 2% -il-o-b- - - - - sg F01000 >2 2005/01/20 15:53 14 1% -il-o-b- sg F01001 >3 2005/01/18 09:532 0% -il-o-b- sg F01002 >4 2005/02/04 16:41 196 100% -il-o-bf sg F01003 >5 2005/02/05

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: 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 JupiterHost.Net
derek 1 2005/01/20 15:39 17 2% -il-o-b- - - - - sg F01000 2 2005/01/20 15:53 14 1% -il-o-b- sg F01001 3 2005/01/18 09:532 0% -il-o-b- sg F01002 4 2005/02/04 16:41 196 100% -il-o-bf sg F01003 5 2005/02/05 21:13 305 100% -il-o-b

  1   2   >