[20023] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 2218 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 27 11:05:32 2001

Date: Tue, 27 Nov 2001 08:05:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1006877108-v10-i2218@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 27 Nov 2001     Volume: 10 Number: 2218

Today's topics:
        closure from a string <bart.lateur@pandora.be>
    Re: closure from a string (Anno Siegel)
    Re: Curses + ANSI? <dont@send.spam>
    Re: detecting if system call hangs on NT <peb@bms.umist.ac.uk>
    Re: detecting if system call hangs on NT <simon.oliver@umist.ac.uk>
    Re: detecting if system call hangs on NT <peb@bms.umist.ac.uk>
        Do some time calculations... (nobody)
    Re: IGNORE OFF TOPIC: RTFM (was Re: A Perl Bug?) <godzilla@stomp.stomp.tokyo>
        Internal Server Error <username@this.is.a.trap.graffl.net>
    Re: Internal Server Error <godzilla@stomp.stomp.tokyo>
        Looping through files in a directory? <vautourNO@SPAMunb.ca>
    Re: Looping through files in a directory? <darkon@one.net>
    Re: Mod perl with "local $/" <bart.lateur@pandora.be>
    Re: Perl CGI scripts with read access contain passwords <bart.lateur@pandora.be>
        PERL puzzler: Date re-ordering to meet xsd format? <kenfine@hotmail.com>
    Re: PERL puzzler: Date re-ordering to meet xsd format? <joe+usenet@sunstarsys.com>
    Re: PERL puzzler: Date re-ordering to meet xsd format? <bernard.el-hagin@lido-tech.net>
    Re: PERL puzzler: Date re-ordering to meet xsd format? (John J. Trammell)
    Re: PERL puzzler: Date re-ordering to meet xsd format? (Helgi Briem)
    Re: RegEx question parsing filename from a path (Anno Siegel)
    Re: RTFM (was Re: A Perl Bug?) <ellem@techie.net>
    Re: Script for stripping FONT (HTML) tags (Tor Fuglerud)
    Re: System call return value 256 - Bad file descriptor (Bryce Pursley)
    Re: System call return value 256 - Bad file descriptor <godzilla@stomp.stomp.tokyo>
    Re: System call return value 256 - Bad file descriptor <dover@nortelnetworks.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 27 Nov 2001 14:33:27 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: closure from a string
Message-Id: <9v770uole1m9cjn0e5te958fkphej9t6ja@4ax.com>

Perl programmers who have advanced beyond the newbie level, will likely
be familiar with this common form of a closure:

	sub gencode {
	    my $x = shift;
	    sub { ++$x }
	}

which you can use as:

	$\ = "\n";		# print on separate lines
	my $code = gencode(12);
	print $code->();
	print $code->();

which prints:

	13
	14

The lexical $x in the sub got locked inside the anonymous sub, and after
that, this remains the only way to access it.

Now the need to build perl code from text strings has arrived, but I
still need to be able to lock in variables, initialised at compile time,
basically, because stringifying references doesn't work. So I tried
this, and to my pleasant surprise, it worked:

	$\ = "\n";
	my $codestring = << '*END*';
	my $x = $x;
	sub {
	    ++$x
	}
	*END*

	my $x = 12;
	my $code12 = eval $codestring;
	$x = 24;
	my $code24 = eval $codestring;
	$x = 123;
	print $code12->();
	print $code24->();
	print $code12->();
	print $code24->();
	print $x;

It prints:

	13
	25
	14
	26
	123

So I've effectively created two closures from one string containing perl
source code, each with their own independent lexical variable. As you
can see, the variable $x used to initialise the closures is not affected
by calling of the subs either.

BTW this is 5.6.1, I cannot garantee that it will work in earlier
versions of Perl, simply because I haven't tested it.

-- 
	Bart.


------------------------------

Date: 27 Nov 2001 15:01:52 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: closure from a string
Message-Id: <9u09t0$jlj$1@mamenchi.zrz.TU-Berlin.DE>

According to Bart Lateur  <bart.lateur@pandora.be>:

[snip]
 
> So I've effectively created two closures from one string containing perl
> source code, each with their own independent lexical variable. As you
> can see, the variable $x used to initialise the closures is not affected
> by calling of the subs either.
> 
> BTW this is 5.6.1, I cannot garantee that it will work in earlier
> versions of Perl, simply because I haven't tested it.

It works with 5.004_04 and (presumably) later, but not with 5.003.

Anno


------------------------------

Date: Tue, 27 Nov 2001 07:03:30 -0800
From: xris <dont@send.spam>
Subject: Re: Curses + ANSI?
Message-Id: <pan.2001.11.27.07.03.19.800309.9312@send.spam>

Not to ask a stupid question, but how might I go about doing that?  Are
there better things than curses for handling multiple scrolling regions
on the screen, that would also allow for ansi color?

On Mon, 26 Nov 2001 22:56:45 -0800, Chris Fedde wrote:

> In article <pan.2001.11.26.21.08.40.695157.6304@send.spam>, xris
> <dont@send.spam> wrote:
>>I recently got readdicted to one of the best muds out there
>>(sneezy.stanford.edu:7900)...  but when I started shopping around for
>>clients, I realized that none of them seem to support both a separate
>>command area (like tintin's #split option) and ANSI moveto controls. Not
>>their fault, just seems to be that it's too hard to do both at once.
>>Anyway, since I couldn't find what I wanted to do in any available
>>clients, I decided to write my own.  Curses rock.  I love the instant
>>control they give me over the screen (I tried Term::Screen but couldn't
>>figure out how to make it scroll)..   However, I can't seem to get it to
>>display control characters as-is, without converting them to the ^X type
>>notation, which is a big hindrance when I want/need to support ANSI
>>colors.
>>
>>
> It's too bad that curses and termcap out lasted Hazeltine, Televideo and
> the Volker-Craig 404. It would be more obvious why curses is the way it
> is if all the myriad of terminal types still existed. As it is now ANSI
> sequences are just about a universal language for this kind of thing.
> 
> If you want to "pass" escape sequences to the display you'll need to
> intercept and tokenize them as if they were commands then make the right
> API call to update the display.



------------------------------

Date: Tue, 27 Nov 2001 15:15:31 +0000
From: Paul Boardman <peb@bms.umist.ac.uk>
Subject: Re: detecting if system call hangs on NT
Message-Id: <3C03AE13.E081BE07@bms.umist.ac.uk>

John Menke wrote:
> 
> Can you detect if a system call hangs on NT?
> 
> I am using something like this:
> 
> system ("c:\\NETSVC OracleOraIAS90HTTPServer \\\\192.168.1.30 /stop");
> 
> How about backticks?

try setting an alarm.

Type 'perldoc  -f alarm' on the command line for more info.

HTH

Paul


------------------------------

Date: Tue, 27 Nov 2001 15:23:14 +0000
From: Simon Oliver <simon.oliver@umist.ac.uk>
To: Paul Boardman <peb@bms.umist.ac.uk>
Subject: Re: detecting if system call hangs on NT
Message-Id: <3C03AFE2.CB9CEF5B@umist.ac.uk>

> John Menke wrote:
> >
> > Can you detect if a system call hangs on NT?

Paul Boardman wrote:

> try setting an alarm.
> 
> Type 'perldoc  -f alarm' on the command line for more info.

Sorry Paul, but alarm is not supported on Win32 - see perlport.

--
  Simon Oliver


------------------------------

Date: Tue, 27 Nov 2001 15:34:25 +0000
From: Paul Boardman <peb@bms.umist.ac.uk>
Subject: Re: detecting if system call hangs on NT
Message-Id: <3C03B281.84FD4FE2@bms.umist.ac.uk>

Simon Oliver wrote:
> 
> > John Menke wrote:
> > >
> > > Can you detect if a system call hangs on NT?
> 
> Paul Boardman wrote:
> 
> > try setting an alarm.
> >
> > Type 'perldoc  -f alarm' on the command line for more info.
> 
> Sorry Paul, but alarm is not supported on Win32 - see perlport.

Ok.  How about using the Sys::AlarmCall from CPAN?

Oh, nope.  The Sys::AlarmCall and Sys:Signal both use the alarm
function...

So, how *do* you time out an operation on Win32?

Paul


------------------------------

Date: Tue, 27 Nov 2001 15:57:02 GMT
From: nobody@nobody.com (nobody)
Subject: Do some time calculations...
Message-Id: <iJOM7.152944$QL2.4343163@amsnews03.chello.com>



Hi all,

I would like to do some time tricks with Date::Parse....

If i do:

my $timeval = str2time('9.dec.2001');

then $timeval = 1007852400 (which is actually
Sun Dec  9 00:00:00 2001).

What I want to do now is use time() to get only the
date with time 00:00:00.

So if I will get a rounded time value for the current day.

Here's one way, but it's damn dirty. Does anyone have
a better idea?

my $wantedtime = str2time($date->time2str('%e.%b.%Y', time));

Thank you....



------------------------------

Date: Tue, 27 Nov 2001 07:43:44 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: IGNORE OFF TOPIC: RTFM (was Re: A Perl Bug?)
Message-Id: <3C03B4B0.637757AD@stomp.stomp.tokyo>

Lou Moran wrote:

> Godzilla! wrote:
> >Lou Moran wrote:
> >> Jake Fan wrote:
> >> > Godzilla! wrote:

> SNIP
> >> SNIP

(highly illogical and inane post by Jake Fan snipped)

> >> You win.  Weirdest Post Ever.

> > Did I not say you boys are trolls? However, this moniker
> > "Lou Moran" is a bit more of a gracious troll than most.

> > I read his post as a classic example of the quality
> > of logic displayed by you boys; a classic example of
> > blowing smoke out of your arse.
 
> But I'm not Frank, right?

There are seasoned opinions I hold on this topic
which I will share as such; opinions.
 
I have no way of knowing if you are The CLPM Troll,
aka Frank Gostak of the sfwest.com site. He or, you,
over the past couple of years, has employed more than
a thousand fake names, fake email addresses and fake
header information via his com site news server and
peer news feed, with some blatant violations of laws,
while posting to and while trolling this group and 
numerous other groups, both past and present.

He is well practiced at this with his daily activity
of insulting and harassing his chat customers with
socially abhorrent behavior via his fake names, then
turning around and presenting himself as an angelic
site operator using the moniker "JSG" which is just
as fake as he. Amongst his more shocking behaviors
is subjecting people, especially females, to vile
sexual remarks and heinous racial slurs.

You recall his long rambling series of abhorrent
racial slurs he directed at me, as "Joe Kline."
You will also recall a handful of regulars here
both defended and supported his racial slurs.

This sociopathic behavior of his dates way back to
Cafe Kyoto chat of which he muscled a take-over 
through fakery, in precisely the same manner, using
the same techniques, as "Sheila King" did taking over
the cgi group.

He is a sociopathic megalomaniac evidenced by his behavior.

In time, as a linguistics expert, I always smoke him
out of his cave in which he cowardly hides. Suppose
this is to be expected; I scare the crap out of him
and he is well noted for being a back-stabbing coward.

As to ascertaining differences between boys here, this
is a formidable but often enjoyable task. My viewpoint
is all boys here are Borg Geeks. There is nothing about
you boys which distinguishes you as individuals. You
all think the same, all talk the same, all react the
same and, I suspect you all look the same.

Contrasting this, I am easily distinguishable being a
very unique and charismatic individual.

* pinches her nose shut and speaks through a rotating house fan *


We are Borg Geek. Mule Manure Is Fertile.
You Will Be Resembulated.


Godzilla!


------------------------------

Date: Tue, 27 Nov 2001 15:33:12 -0000
From: "Andy Laurence" <username@this.is.a.trap.graffl.net>
Subject: Internal Server Error
Message-Id: <9u0bnr$5c783$1@ID-109625.news.dfncis.de>

Hi All,

I'm struggling with 4 of my scripts.  I'm trying to create a little system
which E-Mails tasks to people.  I've created a few bare scripts to run as I
write them, but even the bare scripts are giving an 'internal server error'.
Usually, this type of error would be if I had a typo in #!/usr/bin/perl but
that's fine, and other's work ok too.  I'll list one of the scripts here for
you to pick at as it's truely baffled me.  I'm not a Perl programmer so no
laughing ok ;-)

---------
#!/usr/bin/perl

#############################################
#                                           #
#     Lists all requested CDs and status    #
#                                           #
#     1. Open database                      #
#     2. Print all records to screen        #
#                                           #
#############################################

use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);

print "Content-type: text/html\n\n";

$request="request.db";                  #database path/filename

open REQUEST, "$request" or die "Cannot open $request for read :$!";

while (<REQUEST>)

    print;
    print "<A HRef=list.pl>edit</A><BR>";
}
---------

I've been told that I didn't open the {} in the while statement, but it's on
the first line of the statement (I'm not conventional).  The script is so
simple I don't know what could be wrong.  The permissions are set 755 from
the server console (I was worried Samba didn't work properly) and other
scripts run fine from the same directory with the same permissions.  Any
help appreciated, TIA.

Andy
--
PC-Based Multimedia System
http://www.andylaurence.pwp.blueyonder.co.uk/pcbmms
NB: Spamtrap - my name @yahoo.co.uk




------------------------------

Date: Tue, 27 Nov 2001 07:57:39 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Internal Server Error
Message-Id: <3C03B7F3.BAE981DB@stomp.stomp.tokyo>

Andy Laurence wrote:

(snipped)

> use CGI::Carp qw(fatalsToBrowser);

You will benefit by reading your carp returned error messages:

 "syntax error at c:/apache/users//test/test.pl line 16,
  near ") print" Unmatched right curly bracket at
  c:/apache/users//test/test.pl line 18, at end of line
  syntax error at c:/apache/users//test/test.pl line 18, near "}"
  Execution of c:/apache/users//test/test.pl aborted due to compilation errors."


> while (<REQUEST>)
 
>     print;
>     print "<A HRef=list.pl>edit</A><BR>";
> }


You are missing a right curly bracket after your while 
command as clearly delineated by your error message.

while (<REQUEST>)
 {
  print;
  print "<A HRef=list.pl>edit</A><BR>";
 }


Godzilla!


------------------------------

Date: Tue, 27 Nov 2001 10:36:10 -0400
From: Gil Vautour <vautourNO@SPAMunb.ca>
Subject: Looping through files in a directory?
Message-Id: <3C03A4D9.D6FEDCF5@SPAMunb.ca>

Hello,

I have a number of files in a certain directory and I need to loop
through each one and search for a pattern.  If the pattern is found I
want to extract some text.  I'm wondering what is the best way to go
about this?  I've heard of Find::File, but haven't been able to find the
documentation and I'm not sure how to use it.  I have also read about
opendir() and readdir() but not sure how to use them in this context.
What would be the best approach in this situation, and where might I
find some examples of this sort of thing?

Thanks,




------------------------------

Date: Tue, 27 Nov 2001 15:35:13 -0000
From: David Wall <darkon@one.net>
Subject: Re: Looping through files in a directory?
Message-Id: <Xns91666BB0573FBdarkononenet@207.126.101.97>

Gil Vautour <vautourNO@SPAMunb.ca> wrote on 27 Nov 2001:

> 
> I have a number of files in a certain directory and I need to loop
> through each one and search for a pattern.  If the pattern is found I
> want to extract some text.  I'm wondering what is the best way to go
> about this?  I've heard of Find::File, but haven't been able to find the
> documentation and I'm not sure how to use it.  I have also read about
> opendir() and readdir() but not sure how to use them in this context.
> What would be the best approach in this situation, and where might I
> find some examples of this sort of thing?

If you're only working with the contents of one directory (no subdirs) 
then File::Find might be overkill (although it has some conveniences as 
well).  Open the directory, loop over the contents of the directory using 
readdir, open each file that interests you, loop over its contents, if the 
pattern is found, do something.  Make sure to check the return value of 
each open and close so you'll know if something went wrong -- and enable 
strict and warnings.

The documentation for File::Find comes with Perl.  On any system with Perl 
installed you should be able to view it by typing "perldoc File::Find" at 
a command prompt.  You appear to be using WindowsNT; if you're working 
with Activestate Perl, it comes with the docs in HTML format as well -- 
but the perldoc program will work there, too.

HTH.

-- 
David Wall
darkon@one.net


------------------------------

Date: Tue, 27 Nov 2001 14:36:33 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Mod perl with "local $/"
Message-Id: <l5970ug7lpuiddpv4ansvffa771oep37t4@4ax.com>

Richard Curtis wrote:

>binmode F; local $/ = undef; 
>$encoded = encode_base64(<F>);
>close F;
>
>The question I have, is does this local version of $/ only affect this
>scope ?

You're talking at the root level? It should be. When in doubt, wrap it
in a bare block.

	{
	    binmode F;
	    local $/; 	# no need to assign undef
	    $encoded = encode_base64(<F>);
	    close F;
	}

-- 
	Bart.


------------------------------

Date: Tue, 27 Nov 2001 15:30:03 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Perl CGI scripts with read access contain passwords to database
Message-Id: <67c70u8qvf1dc9l40ig68apki7ah2683a6@4ax.com>

Owain McGuire wrote:

>It's really the other users to the filesystem that worry me.

Then your best bet is to make the scripts only readable/executable by
you as user, and SUID-execute it. (e.g. CGIwrap, SUIDexec)

-- 
	Bart.


------------------------------

Date: Tue, 27 Nov 2001 06:17:10 -0800
From: "Ken Fine" <kenfine@hotmail.com>
Subject: PERL puzzler: Date re-ordering to meet xsd format?
Message-Id: <IfNM7.50$TQ5.75370@news.uswest.net>

I have a date that appears in the following format throughout my text file:

[MONTHEELEMENT].[DAYELEMENT].[YEARELEMENT], e.g.:

7.1.2001

How can I reorder it using PERL substitutions to meet the xsd lexical form,
which in the example above would be:

2001-01-07

It's a little trickier than your average PERL puzzle, because if there is
only a single digit in the "day" or "month" field, a zero must be added to
precede the value. Two-digit values obviously do not take the zero. And the
periods need to be changed to hyphens.

Any takers? Thanks in advance for any help.





------------------------------

Date: 27 Nov 2001 09:23:02 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: PERL puzzler: Date re-ordering to meet xsd format?
Message-Id: <m3u1vg47jt.fsf@mumonkan.sunstarsys.com>

"Ken Fine" <kenfine@hotmail.com> writes:

> Any takers? Thanks in advance for any help.

Look for (s)printf in the perlfunc documentation; also you'll probably
need a regexp to parse the data.

Homework is not topical here.

Good luck.
-- 
Joe Schaefer     "We are all in the gutter, but some of us are looking at the
                                           stars."
                                               -- Oscar Wilde



------------------------------

Date: 27 Nov 2001 14:25:01 GMT
From: Bernard El-Hagin <bernard.el-hagin@lido-tech.net>
Subject: Re: PERL puzzler: Date re-ordering to meet xsd format?
Message-Id: <slrna07bf6.qsr.bernard.el-hagin@gdndev25.lido-tech>

On Tue, 27 Nov 2001 06:17:10 -0800, Ken Fine <kenfine@hotmail.com> wrote:
> I have a date that appears in the following format throughout my text file:
> 
> [MONTHEELEMENT].[DAYELEMENT].[YEARELEMENT], e.g.:
> 
> 7.1.2001
> 
> How can I reorder it using PERL substitutions to meet the xsd lexical form,
> which in the example above would be:
> 
> 2001-01-07
> 
> It's a little trickier than your average PERL puzzle, because if there is
> only a single digit in the "day" or "month" field, a zero must be added to
> precede the value. Two-digit values obviously do not take the zero. And the
> periods need to be changed to hyphens.
> 
> Any takers? Thanks in advance for any help.

------------------
$_ = '7.1.2001';

s/^(\d+)\.(\d+)\.(\d+)$/sprintf("%d-%.2d-%.2d", $3, $2, $1)/e;

print;
------------------

Cheers,
Bernard


------------------------------

Date: Tue, 27 Nov 2001 08:29:11 -0600
From: trammell@haqq.hypersloth.invalid (John J. Trammell)
Subject: Re: PERL puzzler: Date re-ordering to meet xsd format?
Message-Id: <slrna078v6.fbr.trammell@haqq.el-swifto.com>

On Tue, 27 Nov 2001 06:17:10 -0800, Ken Fine <kenfine@hotmail.com> wrote:
> I have a date that appears in the following format throughout my text file:
> 
> [MONTHEELEMENT].[DAYELEMENT].[YEARELEMENT], e.g.:
> 
> 7.1.2001
> 
> How can I reorder it using PERL substitutions to meet the xsd lexical
> form, which in the example above would be:
> 
> 2001-01-07
>

[ ~ ] perl -ple 's/(\d+)\.(\d+)\.(\d+)/sprintf("%d-%02d-%02d",$3,$2,$1)/e'
7.1.2001
2001-01-07
^D
[ ~ ] 

But... yuck.  So you're going from the confusing M.D.YYYY to the
even more confusing YYYYDDMM?  How about something unambiguous:

  2001-1-Aug

Or something that makes sense (from greatest to least significance,
which is handy when sorting):

  2001-07-01

-- 
[W]hen the manager knows his boss will accept status reports without
panic or preeemption, he comes to give honest appraisals.
                               - F. Brooks, _The Mythical Man-Month_


------------------------------

Date: Tue, 27 Nov 2001 15:18:37 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: PERL puzzler: Date re-ordering to meet xsd format?
Message-Id: <3c03abbd.3476807805@News.CIS.DFN.DE>

On Tue, 27 Nov 2001 06:17:10 -0800, "Ken Fine"
<kenfine@hotmail.com> wrote:

>7.1.2001
>
>How can I reorder it using PERL substitutions to meet the 
>xsd lexical form, which in the example above would be:
>
>2001-01-07
>
>It's a little trickier than your average PERL puzzle

1) It's Perl, not PERL.

2) Don't post homework questions. 

3) Read perldoc -q "How do I pad a string with blanks or pad

a number with zeroes?" 

4) Reed perldoc -f split

5) Read perldoc -f sprintf

6) Here's one way:

use strict;
my $date = "7.1.2001";
my ($day,$mth,$year) = split /\./,$date;
$day = sprintf("%02d", $day);
$mth = sprintf("%02d", $mth);
$date = "$year-$mth-$day";
__END__

Regards,
Helgi Briem


------------------------------

Date: 27 Nov 2001 15:10:10 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: RegEx question parsing filename from a path
Message-Id: <9u0aci$jlj$2@mamenchi.zrz.TU-Berlin.DE>

According to Tor Fuglerud <t.k.fuglerud@hf.uio.no>:
> On 23 Oct 2001 13:59:22 -0700, jmenke@scsnet.csc.com (John Menke) wrote:
> 
> >I need to extract the filename from a path statement
> >
> >I will have something like this: 
> >"C:\ORACLE\ORADATA\DBNAME\TEMP01.DBF" in a variable named $filepath
> >
> >how do I get just the TEMP01.DBF into a variable?
> 
> /([^\\]*$)/;    
> $filename = $1;

A better answer is File::Basename, which does this (and more) in
a portable way.

Anno


------------------------------

Date: Tue, 27 Nov 2001 09:07:16 -0500
From: Lou Moran <ellem@techie.net>
Subject: Re: RTFM (was Re: A Perl Bug?)
Message-Id: <mf770u4ibvsb587s96a3ujh2qn6m8o2umq@4ax.com>

On Mon, 26 Nov 2001 19:58:36 -0800, "Godzilla!"
<godzilla@stomp.stomp.tokyo> wrote wonderful things about sparkplugs:

>Lou Moran wrote:
> 
>> Jake Fan wrote:
> 
>> > Godzilla! wrote:
>
SNIP
>> SNIP
> 
>> You win.  Weirdest Post Ever.
> 
>Did I not say you boys are trolls? However, this moniker
>"Lou Moran" is a bit more of a gracious troll than most.
>
>I read his post as a classic example of the quality
>of logic displayed by you boys; a classic example of
>blowing smoke out of your arse. 


But I'm not Frank, right?

--
TMTOWTDI: My way tends to be wrong...
lmoran@wtsg.com


------------------------------

Date: Tue, 27 Nov 2001 15:43:27 GMT
From: t.k.fuglerud@hf.uio.no (Tor Fuglerud)
Subject: Re: Script for stripping FONT (HTML) tags
Message-Id: <3c03b453.15485216@nntp.uio.no>

On Wed, 21 Nov 2001 21:20:08 +0100, ggd@gaura.nitai.hr (Sasa Janiska) wrote:

>Hi!
>
>I'm pretty newbie in the Perl and soem concrete task is ahead of me which 
>has to be finished asap.
>
>Please, do you know for any script which can strip <FONT>, </FONT> and 
><FONT SIZE="+1"> tags from the html files.
>
>I have a bunch of html files placed in several subfolders under root 
>folder which has to be stripped of FONT tags since they have to be 
>formatted via CSS.
>
>Sincerely,
>Sasa
>

#!/local/bin/perl5 -w
use strict;
open IN,"$ARGV[0]";
while(<IN>){
 
    while(/<[^>]*$/){  #This bit ensures that the line you try the later 
        $_=$_.<IN>     #substitution on is closed with respect to <,> pairs
        }
s#(</?font[^>]*>)##gi; #matches any <font something> and </font somthing>
                       #constructs and removes them.
 
print                  #prints whatever is left of the line
}

Tor Fuglerud


------------------------------

Date: Tue, 27 Nov 2001 14:05:53 GMT
From: hbpursle@duke-energy.com (Bryce Pursley)
Subject: Re: System call return value 256 - Bad file descriptor
Message-Id: <3c069bfd.84683939@news.infoave.net>

>Would you like some cheese with your whine?

Actually that would be great!  I guess all you have is Limburger
though.


------------------------------

Date: Tue, 27 Nov 2001 06:25:00 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: System call return value 256 - Bad file descriptor
Message-Id: <3C03A23C.6FED950E@stomp.stomp.tokyo>

Bryce Pursley wrote:

(attributes removed by Pursley)

(snippage not noted by Pursley)

 
> > Would you like some cheese with your whine?
 
> Actually that would be great!  I guess all you have is Limburger
> though.


Incidently, why did you post to this group an article
which is not Perl related?


Godzilla!


------------------------------

Date: Tue, 27 Nov 2001 09:38:22 -0600
From: "Bob Dover" <dover@nortelnetworks.com>
Subject: Re: System call return value 256 - Bad file descriptor
Message-Id: <9u0c2t$76b$1@bcarh8ab.ca.nortel.com>

"Bryce Pursley" wrote in message news:3c0584f0.78783464@news.infoave.net...
>
> You give this group a bad name.  I guess that's why you don't even
> want to use yours.

Hang around, though.  Signal-to-noise ratio is pretty good here.

-BD




------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 2218
***************************************


home help back first fref pref prev next nref lref last post