Re: show only numbers before, within or after the text

2008-06-28 Thread John W. Krahn
Luca Villa wrote: I have a long text file like this: 324yellow 34house black 54532 15m21red56 44dfdsf8sfd23 How can I obtain (Perl - Windows/commandline/singleline) the following? 1) only the numbers at the beginning before some alpha text, like this: 324 34 15 44 2) only the numbers within

Re: Using System to read mixed cased environment variables on Windows

2008-06-28 Thread sisyphus
On Jun 29, 1:18 am, [EMAIL PROTECTED] (Rob Dixon) wrote: . . > > All of the keys of %ENV are capitalized for Windows as the environment > variable > names aren't case-sensitive. > However, I'm finding that system() honours case-preservation. From my reply to the same thread in comp.lang.perl.misc

Re: show only numbers before, within or after the text

2008-06-28 Thread Gunnar Hjalmarsson
Luca Villa wrote: I have a long text file like this: 324yellow 34house black 54532 15m21red56 44dfdsf8sfd23 How can I obtain (Perl - Windows/commandline/singleline) the following? 1) only the numbers at the beginning before some alpha text, like this: 324 34 15 44 2) only the numbers within

show only numbers before, within or after the text

2008-06-28 Thread Luca Villa
I have a long text file like this: 324yellow 34house black 54532 15m21red56 44dfdsf8sfd23 How can I obtain (Perl - Windows/commandline/singleline) the following? 1) only the numbers at the beginning before some alpha text, like this: 324 34 15 44 2) only the numbers within the alpha text, like

Re: Limiting Toke::Parser

2008-06-28 Thread Gunnar Hjalmarsson
Rob Dixon wrote: Gunnar Hjalmarsson wrote: Rob Dixon wrote: Clinton JAmes wrote: How do I stop the parser when I reach "pears". You are presumably using HTML::TokeParser, and not Toke::Parse, Toke::Parse or toke paser. This should do what you want. while (my $tag = $stream->get_tag('div'))

Re: Using System to read mixed cased environment variables on Windows

2008-06-28 Thread Rob Dixon
Dr.Ruud wrote: > ThierryLam schreef: > >> system("set PYTHON"); >> system("set ProgramFiles"); >> >> Output is: >> PYTHON=C:\Python24\python.exe >> PROGRAMFILES=C:\Program Files >> >> You'll notice that through system, the environment variable >> ProgramFiles is all in upper case. Is there a way

Re: Limiting Toke::Parser

2008-06-28 Thread Rob Dixon
Gunnar Hjalmarsson wrote: > Rob Dixon wrote: >> Clinton JAmes wrote: >>> How do I stop the parser when I reach "pears". >> You are presumably using HTML::TokeParser, and not Toke::Parse, Toke::Parse >> or >> toke paser. >> >> This should do what you want. >> >> while (my $tag = $stream->get_tag('d

Re: Using System to read mixed cased environment variables on Windows

2008-06-28 Thread Dr.Ruud
ThierryLam schreef: > system("set PYTHON"); > system("set ProgramFiles"); > > Output is: > PYTHON=C:\Python24\python.exe > PROGRAMFILES=C:\Program Files > > You'll notice that through system, the environment variable > ProgramFiles is all in upper case. Is there a way to preserve the > mixed ca

Re: Limiting Toke::Parser

2008-06-28 Thread Gunnar Hjalmarsson
Rob Dixon wrote: Clinton JAmes wrote: How do I stop the parser when I reach "pears". You are presumably using HTML::TokeParser, and not Toke::Parse, Toke::Parse or toke paser. This should do what you want. while (my $tag = $stream->get_tag('div')) { next unless my $id = $tag->[1]{id}; la

Re: Using System to read mixed cased environment variables on Windows

2008-06-28 Thread Rob Dixon
ThierryLam wrote: > > On Windows XP Pro 32 bit, if I want to output environment variables > PYTHON or ProgramFiles, I use the set command which output the > following: > > C:\set PYTHON > PYTHON=C:\Python24\python.exe > C:\set ProgramFiles > ProgramFiles=C:\Program Files > > If I used Perl 5.003_

Re: Limiting Toke::Parser

2008-06-28 Thread Rob Dixon
Clinton JAmes wrote: > Hi > > I'm trying to use Toke::Parse and would appreciate some advice. > > My html is something like this > > > advise you to > > > > apples > > > > oranges > > > pears > > > >

Re: Funky Characters in Log files

2008-06-28 Thread Jeff Peng
On Sat, Jun 28, 2008 at 7:47 PM, Travis Thornhill <[EMAIL PROTECTED]> wrote: > I know there have probably been a thousand posts on this topic, and I > apologize in advance for skipping over them and deleting them. > > I have instances of strange characters in logs, and I'd like to be able to > pr

Funky Characters in Log files

2008-06-28 Thread Travis Thornhill
I know there have probably been a thousand posts on this topic, and I apologize in advance for skipping over them and deleting them.   I have instances of strange characters in logs, and I'd like to be able to print them properly.   Here's an example of a few lines:   L 06/27/2008 - 18:37:18: "[P

Re: Pass a wild card argument in Win32

2008-06-28 Thread Jenda Krynicky
From: Mike <[EMAIL PROTECTED]> > I've searched google and much of this group to find the answer to this > problem with no luck. > > I am able to pass regular arguments to perl but is it possible to get > the * operator to work like it does in Linux? Like typing in *.cpp to > pass perl all .cpp fil