[23861] in Perl-Users-Digest
Perl-Users Digest, Issue: 6064 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 1 21:05:37 2004
Date: Sun, 1 Feb 2004 18:05:06 -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 Sun, 1 Feb 2004 Volume: 10 Number: 6064
Today's topics:
add multiple email to script <bbhtigger@hotmail.com>
Re: add multiple email to script <matthew.garrish@sympatico.ca>
bunzip2 when exec()-ed from perl script outputs garbage <pmjcovello@shaw.ca>
Re: bunzip2 when exec()-ed from perl script outputs gar (Walter Roberson)
Re: bunzip2 when exec()-ed from perl script outputs gar <pmjcovello@shaw.ca>
Re: Clarifications <bik.mido@tiscalinet.it>
Re: Clarifications <bik.mido@tiscalinet.it>
Re: difficult substitution patterns (commafying) <Joe.Smith@inwap.com>
Re: difficult substitution patterns (commafying) <tadmc@augustmail.com>
Re: difficult substitution patterns (commafying) <matthew.garrish@sympatico.ca>
Help with creating Movies Database <pin@purdue.edu>
Re: Help with creating Movies Database <matthew.garrish@sympatico.ca>
Re: Help with creating Movies Database <tadmc@augustmail.com>
Re: MIME::Lite problem <noreply@gunnar.cc>
Re: Perl For Amateur Computer Programmers <bik.mido@tiscalinet.it>
Re: Perl For Amateur Computer Programmers <Joe.Smith@inwap.com>
Re: Perl, Python, and Ruby <tim@vegeta.ath.cx>
Please repost post r-armed.r040 armed and dangerous <bbhtigger@hotmail.com>
Re: Please repost post r-armed.r040 armed and dangerous (Walter Roberson)
Re: Please repost post r-armed.r040 armed and dangerous <tadmc@augustmail.com>
Re: print matching elements of a list <bik.mido@tiscalinet.it>
Re: print scalar localtime <Joe.Smith@inwap.com>
Re: unused lexicals <dwall@fastmail.fm>
Re: update file in real time via CGI script <Joe.Smith@inwap.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 02 Feb 2004 01:00:09 GMT
From: <bbhtigger@hotmail.com>
Subject: add multiple email to script
Message-Id: <tihTb.15783$QJ3.14976@fed1read04>
help, How do I add multiple emails to this script
# if you would like to be notified of uploads, enter your email address
# between the SINGLE quotes. leave this blank if you would not like to be notified
$notify = 'help@help.com';
------------------------------
Date: Sun, 1 Feb 2004 20:11:27 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: add multiple email to script
Message-Id: <XshTb.2804$9U5.158155@news20.bellglobal.com>
<bbhtigger@hotmail.com> wrote in message
news:tihTb.15783$QJ3.14976@fed1read04...
> help, How do I add multiple emails to this script
>
> # if you would like to be notified of uploads, enter your email address
> # between the SINGLE quotes. leave this blank if you would not like to be
notified
> $notify = 'help@help.com';
>
Seems like I just said this: ask whoever wrote the script; this is not a
helpdesk. And when you're asked to trim your problem down to the smallest
possible example, that doesn't mean post only one line. Even if someone were
inclined to help you, how do you think they would be able to do so when you
have given no indication of how the mail is being formatted and sent?
Matt
------------------------------
Date: Mon, 02 Feb 2004 00:36:37 GMT
From: Thomas Covello <pmjcovello@shaw.ca>
Subject: bunzip2 when exec()-ed from perl script outputs garbage data.
Message-Id: <pan.2004.02.02.00.40.15.261265@shaw.ca>
Hello,
When the following perl script is executed:
#!/usr/bin/env perl
use strict;
use diagnostics;
use warnings;
# Header bytes for different zip formats
my $GZIP_HEADER = "\x1f\x8b\x08\x08";
my $BZIP_HEADER = "BZh9"; # 42 5a 68 39
my $header_bytes;
read STDIN, $header_bytes, 4 or die "Trouble reading input: $!";
if ($header_bytes eq $GZIP_HEADER) {
exec "gunzip -f";
die "gunzip doesn't exist or can't be accessed: $!";
} elsif ($header_bytes eq $BZIP_HEADER) {
exec "bunzip2 -f";
die "bunzip2 doesn't exist or can't be accessed: $!";
} else { die "Not a proper zip file or unsupported zip format." }
I get output like this:
BZh91AY (blah blah blah.... I can't copy it because it contains NULs)
I've used print statements to prove that it executed bzip2 and found the
correct magic number.
------------------------------
Date: 2 Feb 2004 01:03:38 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: bunzip2 when exec()-ed from perl script outputs garbage data.
Message-Id: <bvk7la$aqm$1@canopus.cc.umanitoba.ca>
In article <pan.2004.02.02.00.40.15.261265@shaw.ca>,
Thomas Covello <pmjcovello@shaw.ca> wrote:
:When the following perl script is executed:
:read STDIN, $header_bytes, 4 or die "Trouble reading input: $!";
: exec "bunzip2 -f";
:I get output like this:
:BZh91AY (blah blah blah.... I can't copy it because it contains NULs)
You read 4 bytes from STDIN and then you exec off bunzip2 without
having restored those 4 bytes.
Because you are operating from stdin, you can't be sure that you
are working with a file instead of a pipe, so you can't just
seek() back to the beginning. And you can't use IO::Handle::ungetc
because you can't be sure that will handle more than 1 byte
of pushback.
If you don't want to make a temporary file and have bunzip2 read
that, then you are going to need a pipe that you can stuff the
four bytes into and then copy the rest of input to. And you
want the output of that pipe to be sent to STDOUT. That
implies you are going to have to use something like IPC::Open2
(q.v.). There's probably some complications if you are using
Windows...
--
I was very young in those days, but I was also rather dim.
-- Christopher Priest
------------------------------
Date: Mon, 02 Feb 2004 01:45:47 GMT
From: Thomas Covello <pmjcovello@shaw.ca>
Subject: Re: bunzip2 when exec()-ed from perl script outputs garbage data.
Message-Id: <pan.2004.02.02.01.49.26.895156@shaw.ca>
On Mon, 02 Feb 2004 01:03:38 +0000, Walter Roberson wrote:
> You read 4 bytes from STDIN and then you exec off bunzip2 without
> having restored those 4 bytes.
The -f option of bunzip2, according to the manpage, is supposed to
permit operation without the magic number.
------------------------------
Date: Mon, 02 Feb 2004 22:06:36 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Clarifications
Message-Id: <neet10tpdpp5ohphoarndvivadu0mkc2qg@4ax.com>
On Sun, 01 Feb 2004 00:55:25 GMT, "edgrsprj" <edgrsprj@ix.netcom.com>
wrote:
>If you are not a professional computer programmer and you would like to see
>if Perl might be useful for your purposes then as far as I can see you are
>out of luck. It is so complex that you will never be able to even test it.
I would tend to disagree with your claim! I am *not* a professional
computer programmer and once I happened to try and see if Perl may
have been useful for my purposes, that BTW were to do some arithmetic
computations and (on a completely unrelated basis) off-line HTML
generation, and I found that indeed it was. Still programming in Perl
since then...
<OT but="important!">
To cut the story down, at some (early) stage I found this wonderful
community that unlike other newbies I found helpful and friendly from
the start, and I feel like claiming that probably I've learnt more
things here than from any other resource.
</OT>
I have an exam in two days so I literally don't have the time to
expand on the subject with the depth it would deserve. But I think you
may find my own experience relevant. Just hold on...
Michele
--
#!/usr/bin/perl -lp
BEGIN{*ARGV=do{open $_,q,<,,\$/;$_}}s z^z seek DATA,11,$[;($,
=ucfirst<DATA>)=~s x .*x q^~ZEX69l^^q,^2$;][@,xe.$, zex,s e1e
q 1~BEER XX1^q~4761rA67thb ~eex ,s aba m,P..,,substr$&,$.,age
__END__
------------------------------
Date: Mon, 02 Feb 2004 22:06:41 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Clarifications
Message-Id: <chet109p6etadnspv60vuotp606lvoihs5@4ax.com>
On Sun, 01 Feb 2004 03:58:55 GMT, "John W. Kennedy"
<jwkenne@attglobal.net> wrote:
>Actually, a better language for the purpose would probably be Ruby. It
>has modern features at its heart that PERL only added on later, and
>requires less understanding of obscure technical notions to do everyday
>things.
[snip]
>general rule, Ruby's libraries are more neatly designed than PERL's,
I don't know Ruby, but FWIW I've heard very good cmts about it. OTOH
you surely know that there is not such a thing called 'PERL', don't
you?!?
See
perldoc -q 'difference between "perl" and "Perl"'
Michele
--
# This prints: Just another Perl hacker,
seek DATA,15,0 and print q... <DATA>;
__END__
------------------------------
Date: Mon, 02 Feb 2004 01:11:28 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: difficult substitution patterns (commafying)
Message-Id: <4thTb.201492$I06.2218813@attbi_s01>
John W. Kennedy wrote:
> The correct form of the line is:
> 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/;
Any advantage of using that form as opposed to
1 while s/(\d+)(\d\d\d)/$1,$2/;
?
-Joe
------------------------------
Date: Sun, 1 Feb 2004 19:33:28 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: difficult substitution patterns (commafying)
Message-Id: <slrnc1ra78.9om.tadmc@magna.augustmail.com>
Joe Smith <Joe.Smith@inwap.com> wrote:
> John W. Kennedy wrote:
>
>> The correct form of the line is:
>> 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/;
>
> Any advantage of using that form as opposed to
> 1 while s/(\d+)(\d\d\d)/$1,$2/;
> ?
Not that I can see, other than less backtracking for the first one.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 1 Feb 2004 20:40:07 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: difficult substitution patterns (commafying)
Message-Id: <PThTb.2863$9U5.162929@news20.bellglobal.com>
"Joe Smith" <Joe.Smith@inwap.com> wrote in message
news:4thTb.201492$I06.2218813@attbi_s01...
> John W. Kennedy wrote:
>
> > The correct form of the line is:
> > 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/;
>
> Any advantage of using that form as opposed to
> 1 while s/(\d+)(\d\d\d)/$1,$2/;
> ?
The larger the number to format, the faster your regex becomes:
Formatting the number 1250000 returned:
Method 1: 15 wallclock secs (14.50 usr + 0.00 sys = 14.50 CPU) @ 68965.52/s
(1000000)
Method 2: 15 wallclock secs (14.70 usr + 0.00 sys = 14.70 CPU) @ 68013.33/s
(1000000)
Formatting the number 1250000123456789000000 returned:
Method 1: 58 wallclock secs (57.36 usr + 0.00 sys = 57.36 CPU) @ 17433.75/s
(1000000)
Method 2: 41 wallclock secs (41.73 usr + 0.03 sys = 41.76 CPU) @ 23943.49/s
(1000000)
Matt
------------------------------
Date: Sun, 1 Feb 2004 17:40:33 -0500
From: "TP" <pin@purdue.edu>
Subject: Help with creating Movies Database
Message-Id: <bvjv9b$fbs$1@mozo.cc.purdue.edu>
hi
this is my HTML page for the movie database
http://web.ics.purdue.edu/~tkhor/newdata.html
i get the function for search and list all movies to work but i dont get the
Add movies to work.
this is my source code for my cgi script
sub addrecord {
$NameText = $form{'NameText'};
$moviedescription = $form{'moviedescription'};
$moviecast = $form {'moviecast'};
$NameText=~s/</\</g;
$moviedescription=~s/</\</g;
$moviecast=~s/</\</g;
&open_file("FILE1",">>",$filename);
&write_file("FILE1",$NameText."|".$moviedescription."|".$moviecast."\n");
close(FILE1);
print"Content-type:text/html\n\n";
print"<html><head><title>Thank You </title></head>\n";
print "<body><br><h3><center>Thank you for adding
information</center></h3>\n";
print "<p>";
print"</body></html>\n";
exit;
}
* how should i modify the code so that i make it work?
* when i click on the show all function on the webpage , it seem that i wont
list the MOvie description ... so how can i fix this....
i am a newbie here with perl and cgi..so any help will highly
appreciate!!!!!!!!
thanks
------------------------------
Date: Sun, 1 Feb 2004 18:06:06 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Help with creating Movies Database
Message-Id: <rDfTb.2337$9U5.139321@news20.bellglobal.com>
"TP" <pin@purdue.edu> wrote in message
news:bvjv9b$fbs$1@mozo.cc.purdue.edu...
>
> * how should i modify the code so that i make it work?
>
Ask whoever wrote that awful code how to fix it. This isn't a helpdesk for
buggy code you found on the Web.
Matt
------------------------------
Date: Sun, 1 Feb 2004 17:26:10 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Help with creating Movies Database
Message-Id: <slrnc1r2oi.9fe.tadmc@magna.augustmail.com>
TP <pin@purdue.edu> wrote:
> this is my source code for my cgi script
Are you using the CGI.pm module for decoding the form input?
You should have this near the top of your program, at least
during development:
#!/usr/bin/perl -T
use strict;
use warnings;
use CGI::Carp qw(fatalsToBrowser);
Each of those will help you write correct and secure programs.
Ask for all of the (machine) help you can get!
> $NameText=~s/</\</g;
> $moviedescription=~s/</\</g;
> $moviecast=~s/</\</g;
Ampersand is not special in regexes, so you don't need to backslash it.
Whitespace is not a scarce resource, feel free to use as much as you
like to make your code easier to read and understand.
No need to write the same code three times, write it once,
and loop over it three times instead:
foreach ( $NameText, $moviedescription, $moviecast ) {
s/</</g;
}
(there are other characters that may need escaping you know...)
> &open_file("FILE1",">>",$filename);
Don't use the ampersand on function calls unless you know what it
does, and what it does is what you want (it seldom is what you want).
You should always, yes *always*, check the return value from open():
open_file("FILE1", ">>", $filename) or
die "could not open '$filename' $!";
> &write_file("FILE1",$NameText."|".$moviedescription."|".$moviecast."\n");
write_file('FILE1', join '|', $NameText, $moviedescription, "$moviecast\n";
> i am a newbie here with perl and cgi..so any help will highly
> appreciate!!!!!!!!
Have you seen the Perl FAQs that deal with CGI and HTML?
perldoc -q CGI
Where can I learn about CGI or Web programming in Perl?
What is the correct form of response from a CGI script?
My CGI script runs from the command line but not the browser. (500
Server Error)
How can I get better error messages from a CGI program?
How do I make sure users can't enter values into a form that cause my
CGI script to do bad things?
How do I decode a CGI form?
perldoc -q HTML
How do I remove HTML from a string?
How do I fetch an HTML file?
How do I automate an HTML form submission?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 01 Feb 2004 23:49:21 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: MIME::Lite problem
Message-Id: <bvk0cs$sk6j2$1@ID-184292.news.uni-berlin.de>
p cooper wrote (in comp.lang.perl.modules):
> i want to email an excel format file
You posted about the same problem a few hours ago in
comp.lang.perl.misc, and now you post again in comp.lang.perl.modules,
seemingly ignoring the response you got in comp.lang.perl.misc.
That's very bad manners, and reduces the chances that somebody will
help you further.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Mon, 02 Feb 2004 22:06:13 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Perl For Amateur Computer Programmers
Message-Id: <apus101fs05mppvmeccqrc5pqkqgh55rtn@4ax.com>
On 31 Jan 2004 23:21:47 GMT, "Tassilo v. Parseval"
<tassilo.parseval@rwth-aachen.de> wrote:
>Now that each and every regular in this group has kicked the OP at least
^^^^^^^^^^^^^
>once, I think it is time to move on to something new. It was somewhat
>foreseeable that this thread would become rather repetitive in its
>nature. And yet I am surprised that so many people felt inclined to say
>the same things over and over again.
Well, it is clear that the OP is *not* "yet another troll", or at
least he is not behaving like that! So it is perfectly understandable
that people want to explain him exactly why, where and how his attempt
is wrong.
In fact I may be wrong but my judjement is that overall he's not been
"kicked": some posters were more rude than others, but many of them
kindly analyzed and addressed each point posed by him.
Michele
--
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
"perl bug File::Basename and Perl's nature"
------------------------------
Date: Mon, 02 Feb 2004 00:41:48 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: Perl For Amateur Computer Programmers
Message-Id: <g1hTb.201355$I06.2218890@attbi_s01>
edgrsprj wrote:
> http://www.freewebz.com/eq-forecasting/Perl.html
You should immediately rewrite the section on 'print localtime';
it is completely wrong. Use
C:\>perl -le "print join ':',localtime"
C:\>perl -le "print scalar localtime"
to see what's really there.
-Joe
--
I love my TiVo - http://www.inwap.com/u/joe/tivo/
------------------------------
Date: 1 Feb 2004 22:43:37 GMT
From: Tim Hammerquist <tim@vegeta.ath.cx>
Subject: Re: Perl, Python, and Ruby
Message-Id: <slrnc1r0ih.27d.tim@kimari.saiyix>
edgrsprj <edgrsprj@ix.netcom.com> wrote:
> I took a look at Python and Ruby Web sites to see what those programs
> look like. Perl, Python, and Ruby all look like they could easily
> handle the types of data processing that I need to do. If any of
> them had specific commands installed for controlling Windows programs
> and screens then I might decide to use that program.
While none of these languages as built-in support for native Win32
GUI operations, wach one has made special accomodations for the OS:
For Perl, see `perldoc perlwin32`, and search the CPAN for 'win32'.
Python provides the win32api module, as well as many other modules, for
Win32-specific control. See
<http://python.org/doc/current/modindex.html>.
Ruby provides an explanation of it's Win32 support at this URL:
http://www.ruby-doc.org/docs/ruby-doc-bundle/ProgrammingRuby/book/win32.html
Ruby also provides the Win32API module and the win32ole extension for
dealing with Win32-specific features.
> And at the moment, for a number of reasons I am still leaning towards
> going with Perl.
I'm glad. But assuming this post wasn't troll-bait (like it seemed),
the above should be enough to dispose of this "Such-and-such is better
for MS Windows" argument.
If, in your research, you discover any Perl-specific questions which the
perldocs don't answer, you would be welcome to post them here.
HTH,
Tim Hammerquist
------------------------------
Date: Mon, 02 Feb 2004 00:58:52 GMT
From: <bbhtigger@hotmail.com>
Subject: Please repost post r-armed.r040 armed and dangerous
Message-Id: <ghhTb.15779$QJ3.14460@fed1read04>
help, How do I add multiple emails to this script
# if you would like to be notified of uploads, enter your email address
# between the SINGLE quotes. leave this blank if you would not like to be notified
$notify = 'help@help.com';
------------------------------
Date: 2 Feb 2004 01:06:31 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: Please repost post r-armed.r040 armed and dangerous
Message-Id: <bvk7qn$at4$1@canopus.cc.umanitoba.ca>
In article <ghhTb.15779$QJ3.14460@fed1read04>, <bbhtigger@hotmail.com> wrote:
:help, How do I add multiple emails to this script
:# if you would like to be notified of uploads, enter your email address
:# between the SINGLE quotes. leave this blank if you would not like to be notified
:$notify = 'help@help.com';
Insufficient information -- it depends how whatever program you
are using (which you don't mention) processes the variable, and it
depends on how the program does the mailing, which in turn may depend
on how your system mailer is configured.
Most likely, though, you should simply list the addresses inside
the quotes, with comma as a separator, and no spaces:
$notify - 'help@help.com,pager@help.com';
--
Disobey all self-referential sentences!
------------------------------
Date: Sun, 1 Feb 2004 19:39:05 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Please repost post r-armed.r040 armed and dangerous
Message-Id: <slrnc1rahp.9om.tadmc@magna.augustmail.com>
<bbhtigger@hotmail.com> <bbhtigger@hotmail.com> wrote:
> Subject: Please repost post r-armed.r040 armed and dangerous
What does that mean?
What is "r-armed.r040"?
> help, How do I add multiple emails to this script
^^^^^^^^^^^
What script?
There is no script in your article, only a single line of
code that makes no output.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 02 Feb 2004 22:06:25 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: print matching elements of a list
Message-Id: <m5vs10hb1ro5vtoh367s7lobjhc2lesb7c@4ax.com>
On Sun, 1 Feb 2004 13:14:01 +0000 (UTC), kj <kj345@lycos.com> wrote:
>>perldoc -q "How can I tell whether a certain element is contained in a list or array?
>
>I tried truncating the string in obvious ways, in the hope that
>one of the substrings would lead to the FAQ, but no dice. Any
>other keywords I can use instead?
perldoc -q contained
Michele
--
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
"perl bug File::Basename and Perl's nature"
------------------------------
Date: Sun, 01 Feb 2004 23:01:03 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: print scalar localtime
Message-Id: <PyfTb.200743$I06.2215089@attbi_s01>
kz wrote:
> Is "ref" THE (best) way to check the context of an expression
perldoc -f wantarray
-Joe
------------------------------
Date: Sun, 01 Feb 2004 22:08:11 -0000
From: "David K. Wall" <dwall@fastmail.fm>
Subject: Re: unused lexicals
Message-Id: <Xns9482AE5021A86dkwwashere@216.168.3.30>
J Krugman <jill_krugman@yahoo.com> wrote:
> In <Xns94806FAC09692dkwwashere@216.168.3.30> "David K. Wall"
<dwall@fastmail.fm> writes:
>
>>bill <no_spam@no_spam.com> wrote:
>
>>> Is there a simple way to find the unused lexicals in Perl code?
>>> By "unused lexicals" I mean lexicals that are mentioned only once
>>> in their scope.
>
>> use warnings;
>
> I don't think this takes care of unused lexicals, as bill defines
> them.
Yes, I didn't read the OP closely enough. I even got email from someone who
would probably prefer to be left unnamed telling me about it. <open mouth,
insert foot>...
------------------------------
Date: Sun, 01 Feb 2004 23:14:52 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: update file in real time via CGI script
Message-Id: <MLfTb.75035$U%5.410092@attbi_s03>
Ravi Parimi wrote:
> open F,"tail -f -n 1000 my_file" or die "$!";
You've left out a character.
open F,"tail -f -n 1000 my_file|" or die "tail of my_file: $!";
You can avoid using an external program if you
use File::Tail;
-Joe
--
I love my TiVo - http://www.inwap.com/u/joe/tivo/
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 6064
***************************************