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
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
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
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
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'))
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
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
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
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
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_
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
>
>
>
>
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
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
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
14 matches
Mail list logo