Memories (Was ... oh snap!)

2006-07-13 Thread Chasecreek Systemhouse
You know, in a few weeks, months, years, we are all gonna look back at this and wonder. All this reminds me of circa 1997-98 or there abouts... -- WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Re: regex repetition

2006-07-13 Thread Mumia W.
On 07/13/2006 12:47 AM, Dr.Ruud wrote: "Mumia W." schreef: $str =~ m/^((\d+-\d+|\d+);?)+$/g; However, this does not consider 250-100 to be invalid. Nor "10-30-20". What's the g-modifier for? The structure is 'a;b;c;d', the smallest is 'a', so treat the ';' as the start of a trailer.

Re: regex repetition

2006-07-13 Thread Mumia W.
On 07/13/2006 12:47 AM, Dr.Ruud wrote: "Mumia W." schreef: Ryan Moszynski: I need to write some code to allow users to specify which of a whole bunch of elements(e.g.512/1024) that they want to view. My idea for how to do this was to have them input a semicolon delimited list, for example:

RE: pattern match

2006-07-13 Thread Ken Foskey
On Tue, 2006-07-11 at 18:48 -0700, Timothy Johnson wrote: > open(LYNX,"<","lynx -source http://www.perl.com/ |") or die("Can't open > lynx: $!"); I am not sure that this is right. open(LYNX,"|-","lynx -source http://www.perl.com/";) or die("Can't open lynx: $!"); I think this is. Ta Ken --

Re: MOVE ON ALREADY!!!

2006-07-13 Thread OROSZI Balázs
Hi guys! I'm a total Perl beginner, and I delete most mails, as either I cannot answer or I'm not interested. I'm reading through this thread from the Trash folder, and this is what I gathered: Mr. Shawn H. Corey - calm guy, good Perl skills Rob Dixon - calm guy, good Perl skills Ran

Re: regex repetition

2006-07-13 Thread Dr.Ruud
"Mumia W." schreef: > Dr.Ruud: >> Mumia W.: >>> $str =~ m/^((\d+-\d+|\d+);?)+$/g; >>> >>> However, this does not consider 250-100 to be invalid. >> >> Nor "10-30-20". >> >> What's the g-modifier for? >> >> The structure is 'a;b;c;d', the smallest is 'a', so treat the ';' as >> the start of a

How to write output in an xml file

2006-07-13 Thread Suja Emmanuel
Dear all, I don't know how to write output in an xml file and open in IE browser. If anyone could write the sample program for that it will be very much helpful for me. Thanks in advance, Suja Emmanuel. The information contained in, or attached to, this e-mail, contains c

Re: MOVE ON ALREADY!!!

2006-07-13 Thread Mike Martin
On 13/07/06, OROSZI Balázs <[EMAIL PROTECTED]> wrote: Hi guys! I'm a total Perl beginner, and I delete most mails, as either I cannot answer or I'm not interested. I'm reading through this thread from the Trash folder, and this is what I gathered: Mr. Shawn H. Corey - calm guy, good Perl skills

Re: How to write output in an xml file

2006-07-13 Thread Rob Dixon
Suja Emmanuel wrote: > > Dear all, > > I don't know how to write output in an xml file and open in > IE browser. If anyone could write the sample program for that it will be > very much helpful for me. Hi Suja. You'll have to tell us more about what you want. If you're on a Windows s

Re: write out filenames of files existing on a filesystem into afile

2006-07-13 Thread Jay Savage
On 7/12/06, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: Jay Savage wrote: > opendir(DIR, $somedir) or die "$!\n"; > my @files = grep { $_ !~ /^\.{1,2}$/ && -f "$somedir/$_" } readdir(DIR); > closedir(DIR); my @files = grep { -f } glob( "$somedir/*" ); If you're not interested in subdire

Re: pattern match

2006-07-13 Thread Dr.Ruud
Ken Foskey schreef: > open(LYNX,"|-","lynx -source http://www.perl.com/";) or die("Can't open > lynx: $!"); #!/usr/bin/perl use warnings ; use strict ; my $cmd = 'lynx -source http://www.perl.com/' ; open my $ph, '-|', $cmd or die "\nError opening '$cmd', stopped $!" ; while ( <

Regexp help please

2006-07-13 Thread Brano Gerzo
hello all! I'd like to request for help with this regexp. I want match these examples: word word 3 word word 3 word word en 3 word word en,pt 3 word word en,pt 1cd ok, here is regexp I wrote: ^\s*(\d{1,2}\s+)?([\w\s\+:]+)(sq|hy|ay|bs|bg|hr|cs|da|nl|en|et|fi|fr|de|gr|he|hu|zh|it|ja|kk|lv|pl|pt|pb

How to ignore spaces in directory names?

2006-07-13 Thread Nishi Bhonsle
Hi: In writing a perl script to read the contents of a directory on a windows system, i noticed that there are some directory names have spaces in them. How can I modify the line below so it would ignore the spaces in the directory name and still process it ? opendir DIR, $path or die "Can't ope

RE: How to ignore spaces in directory names?

2006-07-13 Thread Timothy Johnson
This isn't a Perl problem, it has to do with how your shell is processing the command-line parameters. Put double-quotes around the directory name and you won't have a problem. -Original Message- From: Nishi Bhonsle [mailto:[EMAIL PROTECTED] Sent: Thursday, July 13, 2006 11:44 AM To: b

RE: How to ignore spaces in directory names?

2006-07-13 Thread Timothy Johnson
Just to clarify: the double-quotes should go around the argument on the command-line, not the variable in Perl. -Original Message- From: Timothy Johnson Sent: Thursday, July 13, 2006 11:47 AM To: Nishi Bhonsle; beginners perl Subject: RE: How to ignore spaces in directory names? Put do

Re: Regexp help please

2006-07-13 Thread Dr.Ruud
Brano Gerzo schreef: > hello all! > > I'd like to request for help with this regexp. I want match > these examples: > > word word > 3 word word > 3 word word en > 3 word word en,pt > 3 word word en,pt 1cd > > ok, here is regexp I wrote: > ^\s*(\d{1,2}\s+)?([\w\s\+:]+) > (sq|hy|ay|bs|bg|hr|cs|da|nl|

Re: Regexp help please

2006-07-13 Thread Brano Gerzo
Dr.Ruud [DR], on Thursday, July 13, 2006 at 21:05 (+0200) made these points: DR> I don't understand what you try to match with "[\w\s\+:]+". It matches DR> any series of characters that belong to the character class containing DR> [[:word:]], [[:space:]], a plus and a colon. So "a b :c" would matc

How to get the OS local/default drive using perl?

2006-07-13 Thread Nishi Bhonsle
Hi: If I have to create a writeable file say write.txt on fly during program execution under the OS default/local drive of a machine ie C:\ or D:\ on windows and /home/user etc on unix, how can I get that local/default drive using perl so that I dont have to hardcode C:\ or D:\ or /home etc insid

Re: Regexp help please

2006-07-13 Thread D. Bolliger
Brano Gerzo am Donnerstag, 13. Juli 2006 21:23: [...] > yes, my example was ambiguous sorry, for that. Here are more examples: > > word > word word > word word word > 1 word > 1 word word word > 1 word en,pt,sk > 1 word en 1cd > > so: > - first digits are optional > - then it is followed by word(s)

Re: Regexp help please

2006-07-13 Thread Brano Gerzo
D. Bolliger [DB], on Thursday, July 13, 2006 at 21:48 (+0200) typed the following: DB> This data format is ambigous, consider: I know, but I count with it in this case. This regexp is used only for commands to bots, so there should be some "small" errors in parsing :) if it passes to language,

Re: How to get the OS local/default drive using perl?

2006-07-13 Thread Dr.Ruud
"Nishi Bhonsle" schreef: > Hi: > > If I have to create a writeable file say write.txt on fly during > program execution under the OS default/local drive of a machine ie > C:\ or D:\ on windows and /home/user etc on unix, how can I get that > local/default drive using perl so that I dont have to har

Re: How to get the OS local/default drive using perl?

2006-07-13 Thread Aaron Priven
For a temporary file, you'd want to use the File::Temp module (see http://search.cpan.org/~tjenness/File-Temp-0.16/Temp.pm ). For a permanent file, such as a configuration file, you'd probably have to figure it out for each operating system, and then test $^O to figure out which operating s

Re: Regexp help please

2006-07-13 Thread Brano Gerzo
Dr.Ruud [DR], on Thursday, July 13, 2006 at 21:05 (+0200) wrote these comments: as you helped me much, here is example of RE: my $re = '^\s*(?:(\d+)\s+)?(\w+(?:\s+\w+)*?)(?:\s+((?:sq|hy|ay|bs|bg|hr|cs|da|nl|en|et|fi|fr|de|gr|he|hu|zh|it|ja|kk|lv|pl|pt|pb|ro|ru|sr|sk|sl|es|sv|th|tr|uk|al)(?:\s*,

Re: Regexp help please

2006-07-13 Thread Dr.Ruud
Brano Gerzo schreef: > Dr.Ruud [DR], on Thursday, July 13, 2006 at 21:05 (+0200) made these > points: > >> I don't understand what you try to match with "[\w\s\+:]+". It >> matches any series of characters that belong to the character class >> containing [[:word:]], [[:space:]], a plus and a colon.

Re: Regexp help please

2006-07-13 Thread Dr.Ruud
Brano Gerzo schreef: > Dr.Ruud [DR], on Thursday, July 13, 2006 at 21:05 (+0200) wrote these > comments: > > > as you helped me much, here is example of RE: > > my $re = > '^\s*(?:(\d+)\s+)?(\w+(?:\s+\w+)*?)(?:\s+((?:sq|hy|ay|bs|bg|hr|cs|da|nl| en|et|fi|fr|de|gr|he|hu|zh|it|ja|kk|lv|pl|pt|pb|ro|ru|

Re: Regexp help please

2006-07-13 Thread Dr.Ruud
"Dr.Ruud" schreef: > Slight revision, that fails on the last line: More assuming revision: #!/usr/bin/perl use warnings ; use strict ; sub SOB { '\A' } sub EOB { '\z' } sub OR { join '|', @_ } sub sp { '[[:blank:]]+' } sub capture { "(@_)" } sub optional

RE: Regexp help please

2006-07-13 Thread Smith, Derek
-Original Message- From: Dr.Ruud [mailto:[EMAIL PROTECTED] Sent: Thursday, July 13, 2006 5:24 PM To: beginners@perl.org Subject: Re: Regexp help please "Dr.Ruud" schreef: > Slight revision, that fails on the last line: More assuming revision: #!/usr/bin/perl use warnings ; use str

Re: Regexp help please

2006-07-13 Thread Dr.Ruud
Smith, Derek schreef: > Dr.Ruud: >> sub SOB { '\A' } >> sub EOB { '\z' } > > Are all these considered anonymous sub-routines? No, see `perldoc perlsub`. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

RE: Printing after expression match

2006-07-13 Thread Jim
> > while ( ) { > print if /^apple/ .. eof; > } > > > > John > -- > use Perl; > program > fulfillment > Thanks John. I prefer this way. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: MOVE ON ALREADY!!!

2006-07-13 Thread Mathew Snyder
Mike Martin wrote: > On 13/07/06, OROSZI Balázs <[EMAIL PROTECTED]> wrote: >> Hi guys! >> >> I'm a total Perl beginner, and I delete most mails, as either I cannot >> answer or I'm not interested. I'm reading through this thread from the >> Trash folder, and this is what I gathered: >> >> Mr. Sha

Re: Randal L. Schwartz is Wrong (WAS:write out filenames of files existing on a filesystem into afile)

2006-07-13 Thread Dave Gray
On 7/13/06, Chad Perrin <[EMAIL PROTECTED]> wrote: On Thu, Jul 13, 2006 at 01:44:40AM -0400, Mr. Shawn H. Corey wrote: > > It comes down to this, either he will post an apology for stating a > third party should not post his comments, or I'll leave this list, never > to return. 1. You may have

RE: How to write output in an xml file

2006-07-13 Thread Suja Emmanuel
Hi Rob, Thanks for you logic. I will explain what I am doing and what I expect. I have written a code to hit a particular URL from my code and the code will return the rawdata. Now the rawdata itself is an XML file and I want to optn the XML file in internet explorer. The script w

logfile regex

2006-07-13 Thread joseph
hi list, I need help for this script, i think it's more of my regex construct error; #!/usr/bin/perl use strict; use warnings; use Data::Dumper; while() { if(/CDiscoverySource.*/is) { print $_; } } __DATA__ rocessing #7... $$ CDiscoverySource::VerifyClientPublicKeys - Public k