Re: print records that match regexp

2008-01-29 Thread bbrecht56
On Jan 29, 5:55 am, [EMAIL PROTECTED] (Chas. Owens) wrote: > On Jan 29, 2008 2:03 AM, <[EMAIL PROTECTED]> wrote: > snip> Sorry, I missed the "^" for the regexp ^A+ > > snip > > The ^ should only be used if you were to use Perl regexes, and even > then your expression would not match anything but s

Re: Pseudo-hashes are deprecated

2008-01-29 Thread Rob Dixon
Paul Lalli wrote: On Jan 29, 7:45 am, [EMAIL PROTECTED] (Harry Bennett) wrote: I am using this line: foreach my $pair (keys %{$config{server}}) { . } but get the warning: Pseudo-hashes are deprecated at .. I am using the example from 'Programming Perl (third edition)' Section 9.4.3

Re: How to read an rfc spec

2008-01-29 Thread Jeff Pang
-Original Message- >From: [EMAIL PROTECTED] >Sent: Jan 30, 2008 4:58 AM >To: beginners@perl.org >Subject: Re: How to read an rfc spec > >On Jan 28, 2:27 pm, [EMAIL PROTECTED] wrote: >> Hi everyone >> It cost nothing to be polite and only a few seconds to be helpful. I was >> myself lookin

Re: How to read an rfc spec

2008-01-29 Thread wardbayern
On Jan 28, 2:27 pm, [EMAIL PROTECTED] wrote: > Hi everyone > It cost nothing to be polite and only a few seconds to be helpful. I was > myself looking at RFC822 a few days ago to try to figure out what headers > should be in an > email message I bounce with my Perl re-wtite script from a procmail r

Re: Pseudo-hashes are deprecated

2008-01-29 Thread Paul Lalli
On Jan 29, 7:45 am, [EMAIL PROTECTED] (Harry Bennett) wrote: > I am using this line: > > foreach my $pair (keys %{$config{server}}) { > . > > } > > but get the warning: > > Pseudo-hashes are deprecated at .. > > I am using the example from 'Programming Perl (third edition)' Section 9.4.3 O

Re: About File::Monitor

2008-01-29 Thread Jay Savage
On Jan 25, 2008 12:20 PM, <[EMAIL PROTECTED]> wrote: > "Jay Savage" <[EMAIL PROTECTED]> writes: > > > Finally, Tom's points are important. How do you *know* that the files > > (in this case a single directory) changed *during the sleep*? Do you > > know that the output wasn't buffered? That the sy

Re: groups of values from an array

2008-01-29 Thread Chas. Owens
On Jan 29, 2008 11:02 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: snip >if (/^==/) { snip >elsif (/(.+):\s+(.+)/) { Just a few minor quibbles. It is safer to say /^={80}$/ (we don't know if == is valid in the field names), you need to limit the greediness of the first capture (there might be

Reference and assignment question

2008-01-29 Thread Roman Daszczyszak
I was exploring why something didn't work the way I expected using DBM::Deep (0.983 from ActiveState) and came upon some behavior I don't understand. I think it has something to do with using bless or tie, but I have not used either yet. Here is my code. My questions are in the comments for the

Re: groups of values from an array

2008-01-29 Thread Chas. Owens
On Jan 29, 2008 10:28 AM, Horvath, Peter <[EMAIL PROTECTED]> wrote: > You are correct. It is a command that I put to an array. I try to work > with the while loop. Thank you for the guidance. snip I assume by "a command that I put to an array" you mean you are doing something like my @lines = `so

Re: groups of values from an array

2008-01-29 Thread Rob Dixon
Horvath, Peter wrote: Hello Perl guru's, I need to pull multiple values form an array. There are separator array entries. I need to be able to get all the values between the separator values, process them, and then move onto the next group till the end. Here is an example of the array.

Re: Process Directory and subdirectories Recursively

2008-01-29 Thread Rob Dixon
Andrew Limareff wrote: > Mimi Cafe wrote: I am trying to process a directory and all subdirectory recursively and The script will finally be used on Windows OS, Unix system command cannot be used. > > +1 to the File::Find route. It's also much more powerful than your > standard MS-DOS dir /S

RE: groups of values from an array

2008-01-29 Thread Horvath, Peter
You are correct. It is a command that I put to an array. I try to work with the while loop. Thank you for the guidance. -Original Message- From: Chas. Owens [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 29, 2008 9:40 AM To: Horvath, Peter Cc: beginners@perl.org Subject: Re: groups of v

Re: Pseudo-hashes are deprecated

2008-01-29 Thread Peter Scott
On Tue, 29 Jan 2008 07:45:00 -0500, Harry Bennett wrote: > I am using this line: > > foreach my $pair (keys %{$config{server}}) { > . > } > > but get the warning: > > Pseudo-hashes are deprecated at .. > > I am using the example from 'Programming Perl (third edition)' Section 9.4.3 >

Re: groups of values from an array

2008-01-29 Thread Chas. Owens
On Jan 29, 2008 9:25 AM, Horvath, Peter <[EMAIL PROTECTED]> wrote: > Hello Perl guru's, > I need to pull multiple values form an array. There are > separator array entries. I need to be able to get all the values between > the separator values, process them, and then move onto the next grou

groups of values from an array

2008-01-29 Thread Horvath, Peter
Hello Perl guru's, I need to pull multiple values form an array. There are separator array entries. I need to be able to get all the values between the separator values, process them, and then move onto the next group till the end. Here is an example of the array.

Re: How to avoid this greedy match?

2008-01-29 Thread Rob Dixon
News Howardz wrote: > The original mail is regarded as a SPAM by Yahoo -- poor regex match :-(. So I modify the following content and resend it. Sorry, I make a mistake in the mail below: $str = "...xxxzzzy222yy..."; I want to match the script section containing

Re: print records that match regexp

2008-01-29 Thread Chas. Owens
On Jan 29, 2008 2:03 AM, <[EMAIL PROTECTED]> wrote: snip > Sorry, I missed the "^" for the regexp ^A+ snip The ^ should only be used if you were to use Perl regexes, and even then your expression would not match anything but strings that held "A"s (+ matches the last character 1 or more times).

Re: How to match a token not be quoted?

2008-01-29 Thread Rob Dixon
Gunnar Hjalmarsson wrote: Rob Dixon wrote: Gunnar Hjalmarsson wrote: Zhao, Bingfeng wrote: I want to a cure regex that match following requirements: given $line = 'abc abc "abc abcc" abcc', I want to replace all instances of "abc" that not in quotation with, say 'd', so I expect I get 'd d "

Re: Clear a hash

2008-01-29 Thread Chas. Owens
On Jan 29, 2008 1:26 AM, Andrew Limareff <[EMAIL PROTECTED]> wrote: > Chas. Owens wrote: > > > You initialize a hash with a list. So if you want an empty hash then > > you need to assign an empty list to it: > > > > %hash = (); > > > > Couldn't you go > > undef( %hash ); > > to get an undefined re

Re: Pseudo-hashes are deprecated

2008-01-29 Thread Chas. Owens
On Jan 29, 2008 7:45 AM, Harry Bennett <[EMAIL PROTECTED]> wrote: > I am using this line: > > foreach my $pair (keys %{$config{server}}) { > . > } > > but get the warning: > > Pseudo-hashes are deprecated at .. > > I am using the example from 'Programming Perl (third edition)' Section 9.4.3

Re: Clear a hash

2008-01-29 Thread Andrew Limareff
Chas. Owens wrote: You initialize a hash with a list. So if you want an empty hash then you need to assign an empty list to it: %hash = (); Couldn't you go undef( %hash ); to get an undefined ref - leaving the old contents for the system to free up? -- To unsubscribe, e-mail: [EMAIL PR

Re: Pseudo-hashes are deprecated

2008-01-29 Thread John W. Krahn
Harry Bennett wrote: I am using this line: foreach my $pair (keys %{$config{server}}) { . } but get the warning: Pseudo-hashes are deprecated at .. I am using the example from 'Programming Perl (third edition)' Section 9.4.3 I guess my ultimate question would be, what have they been

Re: Want to access Jenda as a PPM repository

2008-01-29 Thread axtens
On Jan 28, 11:46 pm, [EMAIL PROTECTED] (Jeff Pang) wrote: > -Original Message- > >From:axtens<[EMAIL PROTECTED]> > >Sent: Jan 28, 2008 8:32 PM > >To: [EMAIL PROTECTED] > >Subject: Want to access Jenda as a PPM repository > > >Can anyone tell me why Jenda is not available as a repository any

Pseudo-hashes are deprecated

2008-01-29 Thread Harry Bennett
I am using this line: foreach my $pair (keys %{$config{server}}) { . } but get the warning: Pseudo-hashes are deprecated at .. I am using the example from 'Programming Perl (third edition)' Section 9.4.3 I guess my ultimate question would be, what have they been deprecated to? And an

Re: print records that match regexp

2008-01-29 Thread bbrecht56
On Jan 28, 6:11 pm, [EMAIL PROTECTED] (Chas. Owens) wrote: > On Jan 28, 2008 4:12 PM, <[EMAIL PROTECTED]> wrote: > > > I have a table "customer_table" with the following fields: > > > Id int, > > firstname varchar(64), > > lastname varchar(64), > > emailaddress varchar(64) not null primary key > >

Re: Process Directory and subdirectories Recursively

2008-01-29 Thread Andrew Limareff
+1 to the File::Find route. It's also much more powerful than your standard MS-DOS dir /S command. Mimi Cafe wrote: Hi, I am trying to process a directory and all subdirectory recursively and The script will finally be used on Windows OS, Unix system command cannot be used. -- To unsu

Re: file.db VS filedb

2008-01-29 Thread Jenda Krynicky
From: Gunnar Hjalmarsson <[EMAIL PROTECTED]> > Jenda Krynicky wrote: > > The next problem is that > > use DB_File; > > and > >dbmopen ... > > are not related at all. > > Why not? If you read "perldoc dbmopen", you even find an example call of > dbmopen() preceeded by "use DB_File". H,

Re: How to avoid this greedy match?

2008-01-29 Thread John W. Krahn
yitzle wrote: I'm not sure how it works, but I think <> or \<\> is a RegEx reserved character for word matching. That only works for other regular expression engines in programs like vi/less/grep etc. $ echo "abcdefg cde lmncdeopq" | grep -o -e 'cde' cde cde cde $ echo "abcdefg cde lmncdeopq