[21964] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4186 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 27 00:10:45 2002

Date: Tue, 26 Nov 2002 21:10:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 26 Nov 2002     Volume: 10 Number: 4186

Today's topics:
    Re: mozilla & netscape.  incapable of CSS word-break ? <ian@WINDOZEdigiserv.net>
    Re: mozilla & netscape.  incapable of CSS word-break ? <ahj6@hotmail.com>
    Re: mozilla & netscape.  incapable of CSS word-break ? <ian@WINDOZEdigiserv.net>
    Re: mozilla & netscape.  incapable of CSS word-break ? <ahj6@hotmail.com>
    Re: mozilla & netscape.  incapable of CSS word-break ? <ahj6@hotmail.com>
    Re: mozilla & netscape.  incapable of CSS word-break ? <ahj6@hotmail.com>
    Re: mozilla & netscape.  incapable of CSS word-break ? <ahj6@hotmail.com>
    Re: mozilla & netscape.  incapable of CSS word-break ? <ahj6@hotmail.com>
    Re: mozilla & netscape.  incapable of CSS word-break ? <ian@WINDOZEdigiserv.net>
    Re: mozilla & netscape.  incapable of CSS word-break ? (Tad McClellan)
    Re: splice() is fast when shrinking and slow when growi ctcgag@hotmail.com
    Re: splice() is fast when shrinking and slow when growi (Tad McClellan)
        split binary data <nojima@taito.co.jp>
    Re: split binary data <bwalton@rochester.rr.com>
        SQLite help please <bobx@linuxmail.org>
        Tailing file (Yang xiao)
    Re: Tailing file (Damian James)
    Re: Tailing file (Tad McClellan)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 27 Nov 2002 02:09:14 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: Re: mozilla & netscape.  incapable of CSS word-break ?
Message-Id: <i5a8uuog10bvff02i7chjis0249pub3eq3@4ax.com>
Keywords: Remove WINDOZE to reply

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

In a fit of excitement on Wed, 27 Nov 2002 10:57:51 +0900, "Hyungjin
Ahn" <ahj6@hotmail.com> managed to scribble:

[snip useless rambling (still non Perl related)]

> Hyungjin Ahn(ahj6@hotmail.com)

I've come to the conclusion that this person doesn't only have a Perl
language problem, but an English language problem too, although for
some astranged reason, they appear to be able to type in English
(albeit not greatly, but I assume it's not their first language), but
they seriously fail to understand the replies back.

To this, I have one question for Hyungjin:

What part of 'Perl' are you having problems in understanding? because
you seem to somewhat confuse Perl with browser behaviour.

I don't expect a reply of any relevance, as I feel that 'relevant'
isn't a word in their vocab, but one never knows.


Regards,

  Ian

-----BEGIN xxx SIGNATURE-----
Version: PGP Personal Privacy 6.5.3

iQA/AwUBPeQpm2fqtj251CDhEQL0AQCfYmZnLT1l+iVooFuHscXYQ5HE3DUAnA7J
3F71vxxKki1j8n7z3ctDcjh/
=YOCz
-----END PGP SIGNATURE-----

-- 
Ian.H  [Design & Development]
digiServ Network - Web solutions
www.digiserv.net  |  irc.digiserv.net  |  forum.digiserv.net
Scripting, Web design, development & hosting.


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

Date: Wed, 27 Nov 2002 11:27:49 +0900
From: "Hyungjin Ahn" <ahj6@hotmail.com>
Subject: Re: mozilla & netscape.  incapable of CSS word-break ?
Message-Id: <as193p$br0$1@news1.kornet.net>

"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnau6s19.35i.tadmc@magna.augustmail.com...
> Hyungjin Ahn <ahj6@hotmail.com> wrote:
> > I think I'm posting to comp.lang.perl.misc newsgroup, not to
> > comp.lang.any_language_whatsoever newsgroup.
>
> Yes, that is pretty much the point.
> You are posting a browser question in the Perl newsgroup.
> You should post browser questions in a browser newsgroup.
>
> > If you want to share your 'cool script' written in PHP, you'd better
visit
> > php newsgroup and find someone who seeks 'cool script' in the very PHP
> > newsgroup.
>
> If you want to ask a question about browser behavior you'd better
> visit a browser newsgroup:
>
>       comp.infosystems.www.browsers.mac
>       comp.infosystems.www.browsers.misc
>       comp.infosystems.www.browsers.ms-windows
>       comp.infosystems.www.browsers.x

How kind you're! But I questioned how my Perl source code is, and asked any
solution for word-break in Mozilla & Navigator. I already visited a browser
newsgroup and was answered word-break is not CSS standard property.

Though, I can not stop planning to build word-break script, because
word-break of IE is very convenient in presenting non-space-inserted long
phrases such as URLs without breaking table boxes.

I'm still waiting for any suggestion on applying word-break in Mozilla &
Navigator with perl.

the following is quoted from the other post among this thread: ( I wrote it)
> BTW, the fonts such as Times & Arial are well organized
> internationaly so that we should not fail to pick out these
> fonts from any browser. And CSS standard
> is also well adapted around the world so that we shoud not
> fail to fix the fonts in an exact pixel size.( yes, CSS-styled
> fixed font size can not changed by browser specific settings
> of font-size.)

Hyungjin Ahn(ahj6@hotmail.com)


> --
>     Tad McClellan                          SGML consulting
>     tadmc@augustmail.com                   Perl programming
>     Fort Worth, Texas




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

Date: Wed, 27 Nov 2002 02:41:51 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: Re: mozilla & netscape.  incapable of CSS word-break ?
Message-Id: <38c8uuoho0ihpfqc1kdvumi043744ic7k0@4ax.com>
Keywords: Remove WINDOZE to reply

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

In a fit of excitement on Wed, 27 Nov 2002 11:27:49 +0900, "Hyungjin
Ahn" <ahj6@hotmail.com> managed to scribble:

[snip]

> I'm still waiting for any suggestion on applying word-break in
> Mozilla & Navigator with perl.

[snip]

Sir, what don't you understand!? Perl, is _NOT_ a client side scripting
language.


  Ian

-----BEGIN xxx SIGNATURE-----
Version: PGP Personal Privacy 6.5.3

iQA/AwUBPeQxP2fqtj251CDhEQL8VQCgkifVcjMHxLPtI3AzOjeRrnEDWtcAn2X0
pQcXtCUlVlwjXLUCkB+vNoIp
=q7IW
-----END PGP SIGNATURE-----

-- 
Ian.H  [Design & Development]
digiServ Network - Web solutions
www.digiserv.net  |  irc.digiserv.net  |  forum.digiserv.net
Scripting, Web design, development & hosting.


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

Date: Wed, 27 Nov 2002 11:53:29 +0900
From: "Hyungjin Ahn" <ahj6@hotmail.com>
Subject: Re: mozilla & netscape.  incapable of CSS word-break ?
Message-Id: <as1ajs$cpb$1@news1.kornet.net>

"J?gen Exner" <jurgenex@hotmail.com> wrote in message
news:rUME9.608$qe.244@nwrddc03.gnilink.net...
> Hyungjin Ahn wrote:
> Re-inserted text from an earlier post:
> > I made perl code which calculate characters pixel width and insert
spaces
> > or <br>s at the corner of table box for mozilla to break lines. It can
> > calculate utf8's all the CJK chars include western europe chars. Now it
> > works well except a few problems those I'm fixing.
>
> How to render and layout text is determined by the browser only. Therefore
> what you are asking for is impossible (in any language) without
> re-implementing the browsers rendering engine.
> And it's totally impossible when talking about a CGI application because
> there the script can read neither the browser nor the system configuration
> (ever thought of large system fonts and/or high contrast settings which
can
> change the layout drastically?).

There's no need to read browser or the system configuration, but need those
browsers which abide by CSS. According to my experiments comparing the width
& height of each browser among IE, Mozilla, and Navigator (sorry to those
use Opera or etc.), while setting font css-style to be fixed pixel width &
height, those sizes were exactly the sames to each other. Of course, each
range from each character by the both height & width was able to be fixed in
pixel unit with css-style properties.

This test was absolutely done for Times & Arial fonts only.

About the system configuration, I would like to quote my own reply to your
another post: ( I wrote):
> Oh, I'm sorry. I was not far-sighted to think of that! If I feel that's
> needed, I'll start dealing with that.
>
> But I think people from different settings such as system settings like
> large fonts or high contrast for accessibility support well realise this
> topic now does not include them yet. Of course, when I am asked by people
> that why I do not develop Perl scripts of word-break for PDAs such as iPaq
&
> Palm, I only could tell them that this time I do not have any plan for
PDAs
> because PDAs do not support CSS as well as perl interpreter. Even though
> people unconvincing my plan bark at me as you have done upto now, I can't
> make any plan, discussion or topic for PDAs or system-settings which you
> suggested.

Hyungjin Ahn(ahj6@hotmail.com)





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

Date: Wed, 27 Nov 2002 12:05:58 +0900
From: "Hyungjin Ahn" <ahj6@hotmail.com>
Subject: Re: mozilla & netscape.  incapable of CSS word-break ?
Message-Id: <as1bb9$d6a$1@news1.kornet.net>

"Ian.H [dS]" <ian@WINDOZEdigiserv.net> wrote in message
news:38c8uuoho0ihpfqc1kdvumi043744ic7k0@4ax.com...
> In a fit of excitement on Wed, 27 Nov 2002 11:27:49 +0900, "Hyungjin
> Ahn" <ahj6@hotmail.com> managed to scribble:
>
> [snip]
>
> > I'm still waiting for any suggestion on applying word-break in
> > Mozilla & Navigator with perl.
>
> [snip]
>
> Sir, what don't you understand!? Perl, is _NOT_ a client side scripting
> language.

Are you deliberately ignorant, or just plain stupid?

I already told you 'script' means nothing but 'script' itself described in a
dictionary. You didn't listen to my offer to you go and open a dictionary.

Don't you notice yourself yet that you're so stupid that you're no help on
this topic? If you're looking for fun, you please turn off your computer
right now and go out for someone to talk with. Sitting in front of computer
all over the day is not good for healing your stupidity and melancholia.

Hyungjin Ahn(ahj6@hotmail.com)

>
>
>   Ian
>
> -----BEGIN xxx SIGNATURE-----
> Version: PGP Personal Privacy 6.5.3
>
> iQA/AwUBPeQxP2fqtj251CDhEQL8VQCgkifVcjMHxLPtI3AzOjeRrnEDWtcAn2X0
> pQcXtCUlVlwjXLUCkB+vNoIp
> =q7IW
> -----END PGP SIGNATURE-----
>
> --
> Ian.H  [Design & Development]
> digiServ Network - Web solutions
> www.digiserv.net  |  irc.digiserv.net  |  forum.digiserv.net
> Scripting, Web design, development & hosting.




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

Date: Wed, 27 Nov 2002 12:17:55 +0900
From: "Hyungjin Ahn" <ahj6@hotmail.com>
Subject: Re: mozilla & netscape.  incapable of CSS word-break ?
Message-Id: <as1c1m$dlq$1@news1.kornet.net>

"Jeff Zucker" <jeff@vpservices.com> wrote in message
news:3DE41ED4.1030409@vpservices.com...
> Hyungjin Ahn wrote:
> > still
> > waiting for any cool script written in Perl or any idea.
> Waiting for a perl script to solve a CSS problem?  I hope you brought
> along a lunch.

That's too bad that you don't realise what i'm to do. Of course some
liabilities are on my obscure question.

I'm not coding client side script, but server side mod-perl script. (the
word "server side script" is mentioned in the book "Writing Apache Modules
with Perl and C" of O'Reilly books.)

Hyungjin Ahn(ahj6@hotmail.com)

>
> --
> Jeff
>




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

Date: Wed, 27 Nov 2002 12:26:29 +0900
From: "Hyungjin Ahn" <ahj6@hotmail.com>
Subject: Re: mozilla & netscape.  incapable of CSS word-break ?
Message-Id: <as1cho$dtq$1@news1.kornet.net>

"Ian.H [dS]" <ian@WINDOZEdigiserv.net> wrote in message
news:6fl7uu4ru52g538s5lmjgfro08a2uq7g7d@4ax.com...
> In a fit of excitement on Tue, 26 Nov 2002 21:29:01 +0900, "Hyungjin
> Ahn" <ahj6@hotmail.com> managed to scribble:
> > If you mean the subject 'differences between perl & Perl' in FAQ, I
> > completely read.
> > I don't care about differentiating perl from Perl, of course do not
> > use as "awk & Perl" and "Phython & perl".
>
> Tell me where I said that!

You'd better go and play yahoo LiteratiT  game. There're thousands of people
waiting for your gramar lecture.

> > Do you want to argue on a word 'script'?
> That _wasn't_ my issue either.
> > 'script' means nothing but 'script' itself. If you regarded 'script'
> > as 'VBS or something',
> > in this case, what kind of FAQ do you refer?
> _NOTHING_ within CSS/browser rendering has anything to do with Perl (no
> matter how you spell it.. Perl PeRl peRL et al.)
> > Is there any difference between "Script & script"?
> No, but CSS isn't a script.
> > Larry told about "differences between perl & Perl".
> You've confirmed my above thoughts.. you're not deliberately ignorant
> are you.
> > And do you want to define "Script & script"? Even though you will
> > define it, I don't care about your opinion.
> > I'd recommend you go and open dictionary for 'script'.
> > thanks for your recommend, but I don't deal with VBS as well as
> > PHP. -Hyungjin Ahn(ahj6@hotmail.com)
> This has to be the most blatant display of idiocy I've encountered on
> Usenet for a _long_ time.

Unfortunately, now I don't have enough time to play with you. You please
turn off your computer and go out for someone to talk with you. That should
certainly work for your stupidity and melancholia.

Hyungjin Ahn(ahj6@hotmail.com)

>   Ian
> --
> Ian.H  [Design & Development]
> digiServ Network - Web solutions
> www.digiserv.net  |  irc.digiserv.net  |  forum.digiserv.net
> Scripting, Web design, development & hosting.




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

Date: Wed, 27 Nov 2002 12:46:49 +0900
From: "Hyungjin Ahn" <ahj6@hotmail.com>
Subject: Re: mozilla & netscape.  incapable of CSS word-break ?
Message-Id: <as1dns$ef2$1@news1.kornet.net>

"Ian.H [dS]" <ian@WINDOZEdigiserv.net> wrote in message
news:i5a8uuog10bvff02i7chjis0249pub3eq3@4ax.com...
> In a fit of excitement on Wed, 27 Nov 2002 10:57:51 +0900, "Hyungjin
> Ahn" <ahj6@hotmail.com> managed to scribble:
>
> [snip useless rambling (still non Perl related)]
>
> I've come to the conclusion that this person doesn't only have a Perl
> language problem, but an English language problem too, although for
> some astranged reason, they appear to be able to type in English
> (albeit not greatly, but I assume it's not their first language), but
> they seriously fail to understand the replies back.

I thought you're just a stupid, but I was false. You're a sexual pervert.
Ok, I acknowledge you a pervert.

I think you're very angry againt 'this person'. So you now want other people
to have sympathy for your abnormal sexual behavior? okok, I recognize I'm
absolutely false and idiot as well as stupid.. of course I should be
punished! now you feel orgasm? hey, boy.. next time, do not waste your time
in finding pleasure on newsgroups, but just masturbate yourself for a short
time. This will save your money & time.

Hyungjin Ahn(ahj6@hotmail.com)

>   Ian
> --
> Ian.H  [Design & Development]
> digiServ Network - Web solutions
> www.digiserv.net  |  irc.digiserv.net  |  forum.digiserv.net
> Scripting, Web design, development & hosting.




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

Date: Wed, 27 Nov 2002 04:05:08 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: Re: mozilla & netscape.  incapable of CSS word-break ?
Message-Id: <s3h8uu08ett703r9a6q3re6pkvs8m8vvcs@4ax.com>
Keywords: Remove WINDOZE to reply

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

In a fit of excitement on Wed, 27 Nov 2002 12:46:49 +0900, "Hyungjin
Ahn" <ahj6@hotmail.com> managed to scribble:

> "Ian.H [dS]" <ian@WINDOZEdigiserv.net> wrote in message
> news:i5a8uuog10bvff02i7chjis0249pub3eq3@4ax.com...
> > In a fit of excitement on Wed, 27 Nov 2002 10:57:51 +0900,
> > "Hyungjin Ahn" <ahj6@hotmail.com> managed to scribble:
> >
> > [snip useless rambling (still non Perl related)]
> >
> > I've come to the conclusion that this person doesn't only have a
> > Perl language problem, but an English language problem too,
> > although for some astranged reason, they appear to be able to type
> > in English (albeit not greatly, but I assume it's not their first
> > language), but they seriously fail to understand the replies back.
> 
> I thought you're just a stupid, but I was false. You're a sexual
> pervert. Ok, I acknowledge you a pervert.

I hope you can back those claims up, they could cost you a lot.

[snip usual dribble]


  Ian

-----BEGIN xxx SIGNATURE-----
Version: PGP Personal Privacy 6.5.3

iQA/AwUBPeRExGfqtj251CDhEQIqTwCgz59J2cSvqT1PWBbuPulwc4w3wcEAn09x
bElmZuyciIw5WzmWcP0advAe
=iSPQ
-----END PGP SIGNATURE-----

-- 
Ian.H  [Design & Development]
digiServ Network - Web solutions
www.digiserv.net  |  irc.digiserv.net  |  forum.digiserv.net
Scripting, Web design, development & hosting.


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

Date: Tue, 26 Nov 2002 22:20:03 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: mozilla & netscape.  incapable of CSS word-break ?
Message-Id: <slrnau8hvj.1m8.tadmc@magna.augustmail.com>

Hyungjin Ahn <ahj6@hotmail.com> wrote:

> You're a sexual pervert.


Go away troll.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 27 Nov 2002 02:50:51 GMT
From: ctcgag@hotmail.com
Subject: Re: splice() is fast when shrinking and slow when growing an array. Why?
Message-Id: <20021126215051.661$wa@newsreader.com>

ditchen@web.de (Patrick Ditchen) wrote:
> What exactly does splice() do with an array?

A lot.

> I thougt, an array is a
> list of pointers to skalar-values. After a splice()-command, Perl
> should have to rebuild the whole list, no matter if shrinking or
> growing.

It shouldn't have to rebuild it, just slide the values in it around.
Unless you have expanded the list beyond it's current capabilities,
then it has to allocate new space for a bigger list, and copy all the
pointers into this new space.  Of course, it never has to do this when
shrinking an array.



> But when I test its behaviour, splice() with shrinking size
> is done at once while splice() with growing size takes a lot of time.
> Why doesn't Perl have to copy the array in the first case?

It must depend greatly on the test.  I don't get those results for my
test:

    count wall tm  cpu time line
        0 0.000000 0.000000     1:use strict;
        1 0.123445 0.120000     2:my @x=map $_ % 10, 1..100_000;
        0 0.000000 0.000000     3:
        1 0.000021 0.000000     4:my $y;
        0 0.000000 0.000000     5:
   100001 0.203196 1.220000     6:foreach (0..$#x) {
   100000 9.558496 10.90000     7:  $y=splice @x,$_,1;
   100000 9.078559 10.11000     8:  splice @x,$_,0,$y;
   100000 0.580952 1.530000     9:  print $y;
        0 0.000000 0.000000    10:};

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service              New Rate! $9.95/Month 50GB


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

Date: Tue, 26 Nov 2002 22:27:33 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: splice() is fast when shrinking and slow when growing an array. Why?
Message-Id: <slrnau8idl.1m8.tadmc@magna.augustmail.com>

ctcgag@hotmail.com <ctcgag@hotmail.com> wrote:
> ditchen@web.de (Patrick Ditchen) wrote:

>> What exactly does splice() do with an array?

>> After a splice()-command, Perl
>> should have to rebuild the whole list, no matter if shrinking or
>> growing.
> 
> It shouldn't have to rebuild it, just slide the values in it around.
> Unless you have expanded the list beyond it's current capabilities,
> then it has to allocate new space for a bigger list, and copy all the
> pointers into this new space.  Of course, it never has to do this when
> shrinking an array.


And if you want to force it to be big so that you 
grow it only once instead of repeatedly:

   $#array = 99_999_999;  # a hundred million scalar spots in @array


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 27 Nov 2002 10:43:50 +0900
From: Takahide Nojima <nojima@taito.co.jp>
Subject: split binary data
Message-Id: <m3smxneqi1.fsf@nightmare.hm.taito.co.jp>

Hi,

 I'm looking to split a large binary data into some pieces using perl.

 If '$a' has 600[Kbytes] size of binary data,how I can split it into
10[Kbytes] size of binaries?  When content of '$a' is
some multi-byte charactors, I would like to split it
in bytes unit in any cases, so how I should do? In addition,
what codes are better using in future version of perl ?

 I'm appreciated for any idea.

Thanks,
nojima@taito.co.jp





 
 
 


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

Date: Wed, 27 Nov 2002 03:08:46 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: split binary data
Message-Id: <3DE43729.2030907@rochester.rr.com>

Takahide Nojima wrote:

 ...
>  I'm looking to split a large binary data into some pieces using perl.
> 
>  If '$a' has 600[Kbytes] size of binary data,how I can split it into
> 10[Kbytes] size of binaries?  When content of '$a' is
> some multi-byte charactors, I would like to split it
> in bytes unit in any cases, so how I should do? In addition,
> what codes are better using in future version of perl ?
 ...


> nojima@taito.co.jp

Here is one way:

for(1..600*1024){$a.=chr(rand(96)+32)} #generate 600K bytes
@a=($a=~m/(.{10240})/g);push @a,$' if length($')>0; #10K pieces
print "size of a=".@a."\n"; #how many pieces
print join ', ',map {length} @a; #size of each piece

HTH.
-- 
Bob Walton



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

Date: Wed, 27 Nov 2002 04:05:01 GMT
From: "Bob X" <bobx@linuxmail.org>
Subject: SQLite help please
Message-Id: <NvXE9.2902$ov6.1437781@news2.news.adelphia.net>

# simple SQLite test

# pragmas
use strict;
use warnings;

# modules
use DBI;

# variables
my $dbh;
my $sth;
my $rows;

$dbh = DBI->connect("dbi:SQLite:dbname=test_db","","");

$rows = $dbh->do("INSERT family (last_name, first_name)"
                                    . " VALUES('Mix', 'Tom')");

$dbh->disconnect() or die("Cannot disconnect from database");

Error Msg:  DBD::SQLite::db do failed: near "family": syntax error at
dbtest.pl line 17.

Shouldn't the above do the following:

#1 Connect to the test_db or create one and then connect
#2 Insert a table called "family" with  "Tom Mix" as the first data

Or am I balmy? Learning Perl and DBI...

A little nudge in the right direction would help.  : )

Bob

P.S. yes I am going to get the DBI book   : )




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

Date: 26 Nov 2002 19:47:35 -0800
From: yang2002_99@yahoo.com (Yang xiao)
Subject: Tailing file
Message-Id: <55c6e631.0211261947.2e06a8cd@posting.google.com>

hi everyone,
I want to write a script that reads a log file and format it and
output the newly formated data while the log file is still being
writen to continueously.
the normail OPEN will just read everything that's in the file and
stop, in other words, I want something like tail -f.

Thanks in advance.

Yang


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

Date: 27 Nov 2002 03:54:40 GMT
From: damian@qimr.edu.au (Damian James)
Subject: Re: Tailing file
Message-Id: <slrnau8gg0.7kg.damian@puma.qimr.edu.au>

On 26 Nov 2002 19:47:35 -0800, Yang xiao said:
>I want to write a script that reads a log file and format it and
>output the newly formated data while the log file is still being
>writen to continueously.
>the normail OPEN will just read everything that's in the file and
>stop, in other words, I want something like tail -f.

Short answer: this is a FAQ. Please refer to `perldoc -q tail`, since
the answer is pretty much covered there.

On the other hand, if the formatting is not complex, why not just
write a script that does something with stdin, then do
`tail -f file | your_script`?

--damian


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

Date: Tue, 26 Nov 2002 22:21:57 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Tailing file
Message-Id: <slrnau8i35.1m8.tadmc@magna.augustmail.com>

Yang xiao <yang2002_99@yahoo.com> wrote:

> I want something like tail -f.


   perldoc -q tail

is something like that.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

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 4186
***************************************


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