[17663] in Perl-Users-Digest
Perl-Users Digest, Issue: 5083 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Dec 11 18:05:42 2000
Date: Mon, 11 Dec 2000 15:05:19 -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: <976575918-v9-i5083@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 11 Dec 2000 Volume: 9 Number: 5083
Today's topics:
Re: %ENV does not contain some variables? (Mark-Jason Dominus)
.htaccess files lisasiciliani@my-deja.com
Re: .htaccess files (Richard Zilavec)
Re: Anywhere to put my scripts? (Fryar386)
Re: Anywhere to put my scripts? (Richard Zilavec)
Re: Bet you can't guess what this does (spoiler) <elijah@workspot.net>
Re: Bet you can't guess what this does (spoiler) <joe+usenet@sunstarsys.com>
Re: Bet you can't guess what this does (spoiler) <elijah@workspot.net>
Re: Bet you can't guess what this does (spoiler) (Craig Berry)
Re: Bet you can't guess what this does <jeffp@crusoe.net>
Re: Bet you can't guess what this does (Garry Williams)
Re: coloured text? (Abigail)
Re: combining regexps into one (Garry Williams)
Re: compressed files transparently (Chris Fedde)
Re: compressed files transparently <jdhunter@nitace.bsd.uchicago.edu>
Re: compressed files transparently (Chris Fedde)
Re: DBM File Open Problem (Garry Williams)
Re: DBM File Open Problem (Chris Fedde)
Re: directory monitoring (Mark-Jason Dominus)
Re: directory monitoring <ufa_paleta@hp.com>
Re: downloading perl <rajeshpm@emirates.net.ae>
Faster than LWP (BUCK NAKED1)
Re: GD::Graph (Martien Verbruggen)
Re: How can I access seconds since the epoch? <jgoldst@my-deja.com>
Re: How can I access seconds since the epoch? (Chris Fedde)
Re: How do I capture output from a print command (Abigail)
Re: How do I capture output from a print command (Martien Verbruggen)
Re: How do I find out my own IP Address? (Abigail)
Re: Images and Flash movie NOT displaying (Abigail)
mkdir help roof2211@my-deja.com
Re: mkdir help (Richard Zilavec)
Re: mkdir help (Chris Fedde)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 11 Dec 2000 19:07:45 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: %ENV does not contain some variables?
Message-Id: <3a352600.49d9$32a@news.op.net>
In article <0k693tsjpe3602gl3v40c3mgb09eb87l33@4ax.com>,
Bart Lateur <bart.lateur@skynet.be> wrote:
>There can be some black magic involved, WRT environment variables.
>Sometimes, these aren't imported from the environment into Perl until
>they're actually needed.
A request for 'keys %ENV' should be construed as 'actually needing'
the names of all the environment variables.
>Access them once individually, and each will be imported the first time
>they're needed. For example, try something like this:
>
> my @dummy = @ENV{qw(SCRIPT_NAME DOCUMENT_ROOT HTTP_COOKIE)};
If this is actually necessary, it is because Perl has a serious bug in
%ENV handling, and you should try to come up with a test case and
submit a bug report.
However, I believe that you are mistaken.
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
Date: Mon, 11 Dec 2000 20:43:29 GMT
From: lisasiciliani@my-deja.com
Subject: .htaccess files
Message-Id: <913e9g$tg2$1@nnrp1.deja.com>
We are trying to set up a personalized 404 error page. All of the
information we can find on the web says you simply set up a file in
your root directory call ".htaccess" with a single line of code:
ErrorDocument 404 http://www.mcelroytranslation.com/404.html
Set the permissions correctly and you're ready to go. Only, this
doesn't work. I've tried putting the file in the directory one up from
our public directory (the highest one we have access to) and absolutely
nothing happens--we still receive the generic 404 error message. Inside
our public directory, this file wreaks some kind of havoc (every web
page on our site returns a 500 error message) Our friendly internet
server has told us they don't provide support for these kinds of files,
though they do enable the ability to process them on their end.
I appreciate any feedback and help I can get on this.
Thanks,
Evan.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 11 Dec 2000 20:56:11 GMT
From: rzilavec@tcn.net (Richard Zilavec)
Subject: Re: .htaccess files
Message-Id: <3a363e2d.626187007@news.tcn.net>
On Mon, 11 Dec 2000 20:43:29 GMT, lisasiciliani@my-deja.com wrote:
This doesn't seem to have anything to do with perl.
>
>ErrorDocument 404 http://www.mcelroytranslation.com/404.html
Depending on how the server is setup, you might not be allow to
override the ErrorDocument, you might not have override permissions at
all.
>nothing happens--we still receive the generic 404 error message. Inside
>our public directory, this file wreaks some kind of havoc (every web
>page on our site returns a 500 error message) Our friendly internet
The error sounds like your htaccess syntax is incorrect.
--
Richard Zilavec
rzilavec@tcn.net
------------------------------
Date: 11 Dec 2000 21:34:31 GMT
From: fryar386@aol.com (Fryar386)
Subject: Re: Anywhere to put my scripts?
Message-Id: <20001211163431.04509.00000043@ng-cn1.aol.com>
>On your hard disk, that would be nice. Then you can actually run them,
>and still have a copy of them after you switch off your computer.
I meant to run on a server, right now I'm using hypermart.net, but that stinks
------------------------------
Date: Mon, 11 Dec 2000 21:18:17 GMT
From: rzilavec@tcn.net (Richard Zilavec)
Subject: Re: Anywhere to put my scripts?
Message-Id: <3a3543ee.627660558@news.tcn.net>
On 11 Dec 2000 21:34:31 GMT, fryar386@aol.com (Fryar386) wrote:
>I meant to run on a server, right now I'm using hypermart.net, but that stinks
If you have a free machine, build a Linux box..... the OS is free, you
have full controll to install, test, delete, etc.
--
Richard Zilavec
rzilavec@tcn.net
------------------------------
Date: 11 Dec 2000 20:07:27 GMT
From: Eli the Bearded <elijah@workspot.net>
Subject: Re: Bet you can't guess what this does (spoiler)
Message-Id: <eli$0012111455@qz.little-neck.ny.us>
In comp.lang.perl.misc, Mark-Jason Dominus <mjd@plover.com> wrote:
> In article <3a35237b.498b$37c@news.op.net>,
> Mark-Jason Dominus <mjd@plover.com> wrote:
> > perl -le 'print "$$$"'
>
> This is interpreted as if you had written ${$$}. That is, it uses $$
> to get the PID of the current process, say 4391, and then uses that
> PID as a symbolic reference to the scalar $4391.
Hmmm. Should I be surprized that I knew the answer?
Different sort of challenge:
Can you think of code for {BITA} and {BITB} that will make both
{BITA}+{BITB}
{BITA} +{BITB}
Fail to compile, but have
{BITA}+ {BITB}
{BITA}-{BITB}
both compile and work?
Elijah
------
hint: it could be considered a parser bug
------------------------------
Date: 11 Dec 2000 15:24:22 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Bet you can't guess what this does (spoiler)
Message-Id: <m3ofyihfk9.fsf@mumonkan.sunstarsys.com>
Eli the Bearded <elijah@workspot.net> writes:
>
> {BITA}+{BITB}
> {BITA} +{BITB}
>
> Fail to compile, but have
>
> {BITA}+ {BITB}
> {BITA}-{BITB}
>
> both compile and work?
>
Here's my 2 bits:
BITA = 1
BITB = +1
1++1
1 ++1
1+ +1
1+-1
DWIMery, or lack thereof, but not a compiler
bug :)
--
Joe Schaefer
------------------------------
Date: 11 Dec 2000 21:12:04 GMT
From: Eli the Bearded <elijah@workspot.net>
Subject: Re: Bet you can't guess what this does (spoiler)
Message-Id: <eli$0012111603@qz.little-neck.ny.us>
In comp.lang.perl.misc, Joe Schaefer <joe+usenet@sunstarsys.com> wrote:
> Eli the Bearded <elijah@workspot.net> writes:
> > {BITA}+{BITB}
> > {BITA} +{BITB}
> > Fail to compile, but have
> > {BITA}+ {BITB}
> > {BITA}-{BITB}
> > both compile and work?
> Here's my 2 bits:
>
> BITA = 1
> BITB = +1
Hmm. Guess I'm not so good at specifing these things specifically
enough.
BITA = $foo++
BITB = ++$bar
$foo+++++$bar # Can't modify postincrement...
$foo++ +++$bar # Can't modify postincrement...
$foo++-++$bar # works
$foo+++ ++$bar # works
Elijah
------
the things you notice while playing with punctuation sequences
------------------------------
Date: Mon, 11 Dec 2000 21:20:43 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Bet you can't guess what this does (spoiler)
Message-Id: <t3ah9b38veh6c3@corp.supernews.com>
Eli the Bearded (elijah@workspot.net) wrote:
: Can you think of code for {BITA} and {BITB} that will make both
:
: {BITA}+{BITB}
: {BITA} +{BITB}
:
: Fail to compile, but have
:
: {BITA}+ {BITB}
: {BITA}-{BITB}
:
: both compile and work?
BITA = '1'
BITB = '+1'
: hint: it could be considered a parser bug
Seems a straightforward example of the maximum-munch parsing rule to me...
--
| Craig Berry - http://www.cinenet.net/~cberry/
--*-- "The hills are burning, and the wind is raging; and the clock
| strikes midnight in the Garden of Allah." - Don Henley
------------------------------
Date: Mon, 11 Dec 2000 14:16:30 -0500
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: Bet you can't guess what this does
Message-Id: <Pine.GSO.4.21.0012111412380.19179-100000@crusoe.crusoe.net>
On Dec 11, Mark-Jason Dominus said:
>This code:
> perl -le 'print "$"'
>
>produces a fatal error:
>
> Final $ should be \$ or $name at -e line 1, within string
> syntax error at -e line 1, near "print "$""
> Execution of -e aborted due to compilation errors.
>
>But this doesn't:
> perl -le 'print "$$$"'
>
>In fact, it doesn't print anything at all.
>
>Why not?
Without reading the follow-up, I'd say for the same reason that
perl -wle 'print "$$$"'
tells me I've use an uninitialized value, and that
perl -Mstrict -wle 'print "$$$"'
complains that I can't use some number as a SCALAR reference.
--
Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
CPAN - #1 Perl Resource (my id: PINYAN) http://search.cpan.org/
PerlMonks - An Online Perl Community http://www.perlmonks.com/
The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
------------------------------
Date: Mon, 11 Dec 2000 19:28:50 GMT
From: garry@ifr.zvolve.net (Garry Williams)
Subject: Re: Bet you can't guess what this does
Message-Id: <SV9Z5.529$uF3.37945@eagle.america.net>
On Mon, 11 Dec 2000 18:57:00 GMT, Mark-Jason Dominus <mjd@plover.com>
wrote:
>This code:
> perl -le 'print "$"'
>
>produces a fatal error:
>
> Final $ should be \$ or $name at -e line 1, within string
> syntax error at -e line 1, near "print "$""
> Execution of -e aborted due to compilation errors.
>
>But this doesn't:
> perl -le 'print "$$$"'
>
>In fact, it doesn't print anything at all.
>
>Why not?
`$$$' is parsed as a symolic reference and the scalar variable _named_
"$$" is not initialized, so it prints a null string.
--
Garry Williams
------------------------------
Date: 11 Dec 2000 20:19:30 GMT
From: abigail@foad.org (Abigail)
Subject: Re: coloured text?
Message-Id: <slrn93admi.8nl.abigail@tsathoggua.rlyeh.net>
On Sat, 9 Dec 2000 20:57:18 +0100, Simon Stiefel (SiStie@wastie.de) wrote in comp.lang.perl.misc <URL: news:<Pine.LNX.4.21.0012092055590.1221-100000@server.stiefel.priv>>:
++ Hi,
++
++ how can I write coloured text with perl??
#!/opt/perl/bin/perl -wT
use strict;
use Crayons qw ^red yellow blue black olivedrab^;
Abigail
------------------------------
Date: Mon, 11 Dec 2000 19:50:47 GMT
From: garry@ifr.zvolve.net (Garry Williams)
Subject: Re: combining regexps into one
Message-Id: <reaZ5.535$uF3.37945@eagle.america.net>
On Mon, 11 Dec 2000 17:45:40 GMT, eggrock@my-deja.com
<eggrock@my-deja.com> wrote:
>Let me try this again with what I really mean to post...
>
>while(/href=['"]?([a-z_0-9\-\.:\/\#]+)/gi) {
> print "$1\n";
>}
Again, the character class does *not* treat `.' or `#' in a special
way. They do not need to be quoted in a character class. (The `#'
character doesn't need to be quoted in a regular expression outside of
a character class unless the /x option is in effect.) When you quote
unnecessarily, it serves to confuse. The hyphen `-' does not need to
be quoted, if you simply mention it first (or last). Finally, pick a
different quoting character when you will use slash `/' in a regular
expression so that it doesn't have to be quoted (LTS).
--
Garry Williams
------------------------------
Date: Mon, 11 Dec 2000 19:35:01 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: compressed files transparently
Message-Id: <F%9Z5.145$B9.170598912@news.frii.net>
In article <1rk897au81.fsf@video.bsd.uchicago.edu>,
John Hunter <jdhunter@nitace.bsd.uchicago.edu> wrote:
>
>I have some email files that are compressed with gzip (GNUS nnml
>format / 1 message per file). I would like to use the mail::header
>package with these files without unzipping them all the way (since
>they can be quite large with attachements, etc...).
>
>I can parse out the header myself with Compress::Zlib and gzreadline, but
>I don't know how to get a Mail::Header object, which has these
>constructors,
>
> $head = new Mail::Header;
> $head = new Mail::Header \*STDIN;
> $head = new Mail::Header [<>], Modify => 0;
>
>Notably, I can't initialize it with a string header that I have
>obtained independently.
>
>Is there a way to create a file handle to a (possibly) compressed file
>which can then be used transparently by other packages, as in
>
> use Transparent::Compress;
> my $gz = new Transparent::Compress;
> my $handle = $gz->get_gzhandle($filename);
> my $header = new Mail::Header $handle;
>
You can add headers to a Mail::Header one at a time using the 'add' method.
I can't find anything about a Transparent::Compress module but it's pretty
easy to get a file handle that is reading the output of a compressed file.
open(GZ, "gunzip $filename |") or die "$0: can't gunzip $filename: $!";
And then there is the old saw about magic unzip:
for (@ARGV) {s/(.*\.g?z)$/gunzip $1 |/}
With all the rights, privileges and consequences that that entails.
Since these are both unzipping into pipes you can close them after
reading a few lines and not have uncompress more than the size of
a file buffer on your system.
YMMV
chris
--
This space intentionally left blank
------------------------------
Date: 11 Dec 2000 14:26:55 -0600
From: John Hunter <jdhunter@nitace.bsd.uchicago.edu>
Subject: Re: compressed files transparently
Message-Id: <1r1yve7lgw.fsf@video.bsd.uchicago.edu>
>>>>> "Chris" == Chris Fedde <cfedde@fedde.littleton.co.us> writes:
Chris> You can add headers to a Mail::Header one at a time using
Chris> the 'add' method. I can't find anything about a
Chris> Transparent::Compress module
That was an imaginary example.
Chris> but it's pretty easy to get a
Chris> file handle that is reading the output of a compressed
Chris> file.
Chris> open(GZ, "gunzip $filename |") or die "$0: can't gunzip
Chris> $filename: $!";
But the mere act of calling this open command in my test script (never
tried to read or write from the GZ handle) unzipped the files on my
system. This seems to contradict your statement that the pipes can be
closes after reading a few lines.
Thanks for your input. I'm also looking into tieing the filehandle to
a string.
John
------------------------------
Date: Mon, 11 Dec 2000 20:55:36 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: compressed files transparently
Message-Id: <cbbZ5.149$B9.188721152@news.frii.net>
In article <1r1yve7lgw.fsf@video.bsd.uchicago.edu>,
John Hunter <jdhunter@nitace.bsd.uchicago.edu> wrote:
>>>>>> "Chris" == Chris Fedde <cfedde@fedde.littleton.co.us> writes:
>
> Chris> open(GZ, "gunzip $filename |") or die "$0: can't gunzip
> Chris> $filename: $!";
>
>But the mere act of calling this open command in my test script (never
>tried to read or write from the GZ handle) unzipped the files on my
>system. This seems to contradict your statement that the pipes can be
>closes after reading a few lines.
>
Rats! I hate when I do that. I forgot an option to gunzip...
The above should read:
open(GZ, "gunzip -c $filename |") or die ...
I'm sorry about that.
chris
--
This space intentionally left blank
------------------------------
Date: Mon, 11 Dec 2000 19:56:26 GMT
From: garry@ifr.zvolve.net (Garry Williams)
Subject: Re: DBM File Open Problem
Message-Id: <KjaZ5.538$uF3.37945@eagle.america.net>
On Mon, 11 Dec 2000 09:25:52 -0800, Steve Bobrowski
<sbobrows@ix.netcom.com> wrote:
>After doing a bunch of research on this problem, I'm am confused why the
>perl version upgrade is causing the problem. It was my understanding from
>the perl doc that the AnyDBM_File library was meant to resolve DBM file
>compatibility problems when perl is linked with different DBM libraries.
>However, my tests proved that this does not appear to be the case, unless
>there is some other dependency in the perl build of which I am not aware.
There is probably a new version of Berkeley DB linked with perl.
>Anyway, the lesson I learned is to ALWAYS HAVE FLAT FILE BACKUPS OF YOUR DBM
>FILES.
Very good advice.
--
Garry Williams
------------------------------
Date: Mon, 11 Dec 2000 19:51:27 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: DBM File Open Problem
Message-Id: <3faZ5.146$B9.170583552@news.frii.net>
In article <t3a3f3suvtck79@corp.supernews.com>,
Steve Bobrowski <sbobrows@ix.netcom.com> wrote:
>Trevor,
>
>Thanks for your notes. I independently hit the jackpot this AM, which
>confirms your suspicions.
>
>Here's a little more background on the situation in case anyone else
>encounters a similar problem:
>
I suspect that what happened is that the default version of the
dbm libraries changed durring one of the upgrades. Since you
started on FreeBSD I guess that your db files were created using
the Berkeley_DB libraries. A quick look at the www.sleepycat.com
site shows:
The underlying file format for the hash access method changed
between version 1.85 and version 1.86, so you must dump and
reload all of your databases to convert from version 1.85 to
version 1.86.
Your solution to the problem is one implementation of the recomended
migration plan sugjested above.
BTW Your recomendation to keep periodic dumps of your DB files
is a good one.
chris.
--
This space intentionally left blank
------------------------------
Date: Mon, 11 Dec 2000 19:15:33 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: directory monitoring
Message-Id: <3a3527d4.4a00$dc@news.op.net>
Keywords: domesticate, firewood, him, sealant
In article <912ocs$rdg$1@news-int.gatech.edu>,
Steven Scott <bodoni26@resnet.gatech.edu> wrote:
>I just did a "man 2 stat" and found this:
>
> Traditionally, st_mtime is changed by mknod(2), utime(2),
> and write(2). The st_mtime is not changed for changes in
> owner, group, hard link count, or mode.
>
>So that says to me that the mtime is definately changed when a file is
>created or changed, but what about deleted?
When a file is deleted, it no longer has an mtime, because it has been
deleted.
However, the deletion was accomplished by *writing* a change to the
file's directory, so deleting a file updates the mtime of its
directory.
The mtime of the directory is not changed when you write to a file in
the directyory, because you have not written anything to the directory.
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
Date: Mon, 11 Dec 2000 14:37:11 -0500
From: "Ufa Paleta" <ufa_paleta@hp.com>
Subject: Re: directory monitoring
Message-Id: <913aea$7u9$1@web1.cup.hp.com>
Not sure if this will help, but have you had a look at fam and imon?
http://oss.sgi.com/projects/
Regards
Ufa
Steven Scott wrote in message <912pvl$rti$1@news-int.gatech.edu>...
>>No, Un*x does not have a means of sending an asynchronous message to a
>>process that the contents of a file or directory has changed. What you
>>can do is to monitor the directory's inode (by using stat) and
>>periodically checking for changes in the mtime.
>
>so since the directory's mtime doesn't change when a file changes (I just
>played around with it a bit), there's really not a way to do this without
>checking each file individually, is there?
>
>--
>Steven Scott [imnotgoth@progoth.com]
>"...computer technicians spent huge portions of their youth heavily
>steeped in Lego and its highly focused, solitude-promoting culture.
>Lego was their common denominator toy." --Douglas Coupland
>
>
------------------------------
Date: Tue, 12 Dec 2000 00:38:40 +0400
From: "rajeshpm" <rajeshpm@emirates.net.ae>
Subject: Re: downloading perl
Message-Id: <913djl$pgj5@news.emirates.net.ae>
>
> No, the problem is that you download the version that was compiled for
> Windows NT on Dec Alpha machines rather than for Intel machines. You need
> to go back to ActiveState and get the right version.
>
Thanks now it is working
regards
------------------------------
Date: Mon, 11 Dec 2000 13:05:05 -0600 (CST)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Faster than LWP
Message-Id: <16237-3A352561-11@storefull-245.iap.bryant.webtv.net>
Is there a faster way to grab a URL than using LWP? I've tried get and
getstore from LWP/Simple and LWP/UserAgent. These methods appear to take
so long that my webserver is timing out before grabbing the URL.
I read the FAQ, and saw Tom Christiansen's example of a way to grab a
URL 100X faster, but couldn't figure out how to put a scalar reference
to it for storage. Also, Tom seems to say that his 100X faster method
isn't always effective.
Any suggestions would be appreciated.
Thank You,
Dennis
------------------------------
Date: Mon, 11 Dec 2000 21:50:50 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: GD::Graph
Message-Id: <slrn93aj0e.nr.mgjv@verbruggen.comdyn.com.au>
On Mon, 11 Dec 2000 17:51:56 +0000,
François Breuiller <francois@idylic.com> wrote:
>
> Hello,
>
> I would like to know how set a grid in a graph ...
>
> Is there a possibility with GD::Graph ?
See my answer in clp.modules. Next time you post the same question to
two groups, please use the crossposting facility of your newsreader.
Martien
--
Martien Verbruggen |
Interactive Media Division | 42.6% of statistics is made up on the
Commercial Dynamics Pty. Ltd. | spot.
NSW, Australia |
------------------------------
Date: Mon, 11 Dec 2000 20:22:07 GMT
From: JL Goldstein <jgoldst@my-deja.com>
Subject: Re: How can I access seconds since the epoch?
Message-Id: <913d16$s88$1@nnrp1.deja.com>
In article <9130le$f71$1@pegasus.csx.cam.ac.uk>,
mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
> printf "Job running time %s seconds\n", time - $^T;
^
er, shouldn't this be a 'd'?
<sticking neck out fearfully>
--
Anyone for Perl bowling?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 11 Dec 2000 21:31:25 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: How can I access seconds since the epoch?
Message-Id: <NIbZ5.151$B9.188720640@news.frii.net>
In article <913d16$s88$1@nnrp1.deja.com>,
JL Goldstein <jgoldst@my-deja.com> wrote:
>In article <9130le$f71$1@pegasus.csx.cam.ac.uk>,
> mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
>
>> printf "Job running time %s seconds\n", time - $^T;
> ^
> er, shouldn't this be a 'd'?
>
> <sticking neck out fearfully>
$ perl
printf "Job running time %s seconds\n", time - $^T;
^d
Job running time 2 seconds
:-)
>Anyone for Perl bowling?
>
1 2 3 4 5 6 7 8 9 10
/ / X / X / / / / X
--
This space intentionally left blank
------------------------------
Date: 11 Dec 2000 20:44:05 GMT
From: abigail@foad.org (Abigail)
Subject: Re: How do I capture output from a print command
Message-Id: <slrn93af4l.8nl.abigail@tsathoggua.rlyeh.net>
On Mon, 11 Dec 2000 09:39:01 GMT, Bart Lateur (bart.lateur@skynet.be) wrote in comp.lang.perl.misc <URL: news:<n1893t4v91854batmiu1gmmknn6s6vqsf5@4ax.com>>:
++
++
++ Using Unix, your can use all sorts of fork/pipe tricks, but that's Unix,
++ not Perl.
But Perl is hardly anymore than a wrapper around the Unix API....
Abigail
------------------------------
Date: Mon, 11 Dec 2000 22:00:01 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: How do I capture output from a print command
Message-Id: <slrn93ajhl.nr.mgjv@verbruggen.comdyn.com.au>
On Fri, 08 Dec 2000 00:37:56 GMT,
huem@my-deja.com <huem@my-deja.com> wrote:
> Hi,
>
> How do I capture the out put from the print
> command. I would prefer capture it directly not
> from a file. I use perl4.
That severely limits the possibilities, and it reduces your hopes for
support from here to almost nil. Most people here have forgotten too
many things about Perl 4.
> $var="blah";
> open(PIPE, "|cmd");
> print PIPE,"$var";
>
> I have tried $out=print ... to no avail.
What do you mean 'capture output from the print command'? You print to
a file handle, and the output ends up in a file. You print to a
socket, and the output ends up at the reader on the other end. print
where you want to print.
In Perl 5 you could use tied handles. Depending on what you mean, a
reopen of the handle to something else might be what you want:
open(STDOUT, ">some_file") ||
die "Cannot reopen STDOUT to some_file: $!"
Is what you are really saying that you have an external program, and
you want to write to it as well as read from it? Perl 5 has
IPC::Open2, and I seem to recall that Perl 4 shipped with a library
called open2.pl. I think maybe that is what you want.
Now, please, if you insist on continuing to use a perl version that
has been dead since 1995, then also accept that you are on your own.
get yourself an old copy of the Camel (Programming Perl), and maybe
some other old books, but don't expect people here to know much about
it anymore.
Just get with the times, and get Perl 5
Martien
--
Martien Verbruggen |
Interactive Media Division | That's funny, that plane's dustin'
Commercial Dynamics Pty. Ltd. | crops where there ain't no crops.
NSW, Australia |
------------------------------
Date: 11 Dec 2000 20:46:36 GMT
From: abigail@foad.org (Abigail)
Subject: Re: How do I find out my own IP Address?
Message-Id: <slrn93af9c.8nl.abigail@tsathoggua.rlyeh.net>
On Fri, 08 Dec 2000 23:51:43 +0100, Christoph (cvh@gmx.de) wrote in comp.lang.perl.misc <URL: news:<3A3165FF.A1434D27@gmx.de>>:
++ Hello,
++
++ could anybody tell me how to find out the IP-address that my
++ internet-provider gives me at dial-up?
The IP address is handed out at the PPP handshake.
Find out what program builds up the PPP connection (if it's PPP that
you use), and what kind of hooks that provides.
++ I allready searched CPAN but I couldn't find anything that looks like a
++ solution.
That's because what you want has nothing to do with Perl and is extremely
non-portable.
Abigail
------------------------------
Date: 11 Dec 2000 20:57:09 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Images and Flash movie NOT displaying
Message-Id: <slrn93aft5.8nl.abigail@tsathoggua.rlyeh.net>
On Sun, 10 Dec 2000 04:17:08 GMT, ATHAR IQBAL (athar@look.ca) wrote in
comp.lang.perl.misc <URL: news:<8tDY5.10693$7.419812@quark.idirect.com>>:
++ As a novice , I am using a perl script for login and password . When the
++ User logs in, the page called by script DOES NOT display any image or Flash
++ Contents. The content types are set to"text/html" in the script.
++
++ Could anybody please advise me how this can be corrected ? I will be highly
++ obliged.
What makes you thing images or flash are "text/html"?
What makes you think this is a Perl problem?
Abigail
------------------------------
Date: Mon, 11 Dec 2000 21:01:20 GMT
From: roof2211@my-deja.com
Subject: mkdir help
Message-Id: <913fas$u8n$1@nnrp1.deja.com>
I created a directory using: mkdir. I have tried
different modes: -p, -w,-r,-x,-W,-R,-m. But I
can't save any files to the newly created dir.
Any ideas?
Ian
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 11 Dec 2000 21:19:44 GMT
From: rzilavec@tcn.net (Richard Zilavec)
Subject: Re: mkdir help
Message-Id: <3a3644b5.627859517@news.tcn.net>
On Mon, 11 Dec 2000 21:01:20 GMT, roof2211@my-deja.com wrote:
>I created a directory using: mkdir. I have tried
>different modes: -p, -w,-r,-x,-W,-R,-m. But I
>can't save any files to the newly created dir.
What mode is the current directory set too? Are you getting anytype
of error when you attempt to write to it?
--
Richard Zilavec
rzilavec@tcn.net
------------------------------
Date: Mon, 11 Dec 2000 21:43:10 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: mkdir help
Message-Id: <OTbZ5.152$B9.171090944@news.frii.net>
In article <913fas$u8n$1@nnrp1.deja.com>, <roof2211@my-deja.com> wrote:
>
>
>I created a directory using: mkdir. I have tried
>different modes: -p, -w,-r,-x,-W,-R,-m. But I
>can't save any files to the newly created dir.
>Any ideas?
>
>Ian
>
Let me paraphrase some advice that I used to hear from our support group...
"Cut, Paste, post to Usenet"
Or more verbosely. Show us the code you've tried and we'll see if we can
find what is wrong.
chris
--
This space intentionally left blank
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 5083
**************************************