[25014] in Perl-Users-Digest
Perl-Users Digest, Issue: 7264 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 18 03:07:03 2004
Date: Mon, 18 Oct 2004 00:05:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 18 Oct 2004 Volume: 10 Number: 7264
Today's topics:
Re: How to checking a file that writing is complete? <bik.mido@tiscalinet.it>
Re: How to show 'expiry page' when user click 'back' bu <darick_ang@yahoo.com.sg>
Re: How to show 'expiry page' when user click 'back' bu <spamtrap@dot-app.org>
Re: Is this really legal? <bik.mido@tiscalinet.it>
Localtime returning wrong month <Deke@nospam.com>
Re: Localtime returning wrong month <tony_curtis32@yahoo.com>
Re: Localtime returning wrong month <tadmc@augustmail.com>
Re: Localtime returning wrong month (Jonathan Tree)
Mason book available as PDF file? <postmaster@castleamber.com>
options to shrink-wrap a perl script (dan baker)
Re: options to shrink-wrap a perl script <abigail@abigail.nl>
overriding perl switch <sravi.in@gmail.com>
Re: overriding perl switch <postmaster@castleamber.com>
Re: overriding perl switch <sravi.in@gmail.com>
Re: overriding perl switch <postmaster@castleamber.com>
Re: overriding perl switch <abigail@abigail.nl>
Re: Redirect with no referer... (Malcolm Dew-Jones)
Re: Top posting (was Re: Concatenating an array into on <dha@panix.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 17 Oct 2004 20:40:21 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: How to checking a file that writing is complete?
Message-Id: <ate5n0lkfrh3v9eia8te00t8n3slkmr4t4@4ax.com>
On Sun, 17 Oct 2004 17:30:13 +0800, "news.hinet.net"
<sonet@msa.hinet.net> wrote:
>What is the definition of the original directory and the destination
>directory are on the same file system??
It's that they must be on the same file system!!
;-)
>The meaning is the same partition , the same filesystem type(ex. NTFS
><->NTFS) or the same HardDisk?
Amongst these choices: same partition. More generally: same... ehm!
filesystem. Sorry for the tautology...
HTH,
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Mon, 18 Oct 2004 11:27:09 +0800
From: Darick <darick_ang@yahoo.com.sg>
Subject: Re: How to show 'expiry page' when user click 'back' button in browser ?
Message-Id: <lsd6n095j457hgqgq0ndns5hahh5hat37o@4ax.com>
On 14 Oct 2004 03:37:04 GMT, "A. Sinan Unur"
<usa1@llenroc.ude.invalid> wrote:
>Darick <darick_ang@yahoo.com.sg> wrote in
>news:gfmrm0p5gh2mucg4ddvra9tbb8nmie1ocf@4ax.com:
>
>> I face a problem when i try to develope a e-commerce program.
>>
>> i want to show customer 'expiry page' when they try to click 'back'
>> button on the checkout page.
>> may i know how to do that ? i personally check the forum and try the
>> following command.
>
>What forum did you check?
>
>> #!/usr/bin/perl
>> print "Content-type: text/html\n";
>> print "Pragma: no-cache\n";
>> print "Expires: -1\n";
>> print "Cache-Control: no-cache\n";
>> print "\n";
>> #### follow with the html body content
>>
>> but seem like doesn't work. may i know can the above command support
>> dynamic page generated by perl cgi program ?
>
>Your question has nothing to do with Perl. You should head on over to a CGI
>group.
>
what forum do u suggest ?
>Sinan.
------------------------------
Date: Sun, 17 Oct 2004 23:51:55 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: How to show 'expiry page' when user click 'back' button in browser ?
Message-Id: <U4OdnWxwvu9BoO7cRVn-vw@adelphia.com>
Darick wrote:
> what forum do u suggest ?
Is your keyboard broken? It's spelled "you".
Your news reader app can list the available groups for you. Do that, and
look for one with "cgi" in its name.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Mon, 18 Oct 2004 09:03:03 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Is this really legal?
Message-Id: <nff5n0lom82prrvb4movnca8g24s31samv@4ax.com>
On 17 Oct 2004 17:53:00 GMT, Abigail <abigail@abigail.nl> wrote:
>`` would be *exactly* the same. Now I may be utterly wrong but IIRC
>`` C<//=> is supposed to be incorporated in Perl5 along some next major
>`` release, isnt it?
>
>5.9.1 has it. And patches for all releases since 5.8.1 are available.
>I always patch my Perl to have this operator.
TY, I didn't know that!
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Sun, 17 Oct 2004 15:01:07 -0400
From: Deke <Deke@nospam.com>
Subject: Localtime returning wrong month
Message-Id: <10n5gbm2knf8mb0@news.supernews.com>
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)
= localtime(time);
print "\n$sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst \n";
When I run this today. It gives me 9 for the month ($mon) instead of 10.
Why is that?
Output : 56,0,15,17,9,104,0,290,1
Date command on the Unix commandline returns Sun Oct 17 14:58:58 EDT 2004
------------------------------
Date: Sun, 17 Oct 2004 14:05:54 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Localtime returning wrong month
Message-Id: <87655988rx.fsf@limey.hpcc.uh.edu>
>> On Sun, 17 Oct 2004 15:01:07 -0400,
>> Deke <Deke@nospam.com> said:
> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
> localtime(time);
> print "\n$sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst
> \n";
> When I run this today. It gives me 9 for the month ($mon)
> instead of 10.
perldoc -f localtime.
What's the range of the month value?
Note there are much friendlier ways of doing date
manipulation. What were you trying to do?
hth
t
------------------------------
Date: Sun, 17 Oct 2004 16:55:16 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Localtime returning wrong month
Message-Id: <slrncn5qi4.uh4.tadmc@magna.augustmail.com>
Deke <Deke@nospam.com> wrote:
> Subject: : Localtime returning wrong month
No it isn't.
> = localtime(time);
You should read the documentation for the functions that you use:
perldoc -f localtime
> When I run this today. It gives me 9 for the month ($mon) instead of 10.
> Why is that?
Because that is exactly what it is supposed to do! Sheesh!
Asking hundreds of people around the world to read the docs to
you may have a profound negative effect on your ability to get
help here when you really _do_ have a problem.
Please don't do that anymore.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 17 Oct 2004 18:29:44 -0700
From: takarov2003@yahoo.com (Jonathan Tree)
Subject: Re: Localtime returning wrong month
Message-Id: <c5129e0a.0410171729.402b3064@posting.google.com>
Deke <Deke@nospam.com> wrote in message news:<10n5gbm2knf8mb0@news.supernews.com>...
> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)
> = localtime(time);
>
> print "\n$sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst \n";
>
> When I run this today. It gives me 9 for the month ($mon) instead of 10.
> Why is that?
If you were expecting to get a value for October, that is the correct
return value for month. According to the man page for the function,
month ranges from 0 to 11. Think of the index to an array of months .
. .
>
> Output : 56,0,15,17,9,104,0,290,1
>
> Date command on the Unix commandline returns Sun Oct 17 14:58:58 EDT 2004
------------------------------
Date: 18 Oct 2004 05:36:00 GMT
From: John Bokma <postmaster@castleamber.com>
Subject: Mason book available as PDF file?
Message-Id: <Xns958661ABB22Ccastleamber@130.133.1.4>
Since it's available as HTML, freely, I was wondering, is there a PDF
version available?
--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
------------------------------
Date: 17 Oct 2004 13:12:54 -0700
From: botfood@yahoo.com (dan baker)
Subject: options to shrink-wrap a perl script
Message-Id: <13685ef8.0410171212.3f29430b@posting.google.com>
I would like to "shrink-wrap" a simple perl utility to install on a
client PC. preferably something they can run without installing perl.
The intent is not to protect source from reverse engineering, but just
to simplify installation and execution by a user that doesnt need
*all* of perl.
The specific application will be to create a hardwired little script
to FTP a couple files from a remote webserver, to a local PC, just to
back up a couple files without them having to know anything about FTP.
The plan would be to have the Windows task manager fire up the script
nightly, like a cron job.
any ideas on free/cheap software to allow my to "compile" a simple
script into something that can be easily installed and executed in
Windows on a PC without installing Perl?
thanks,
d
------------------------------
Date: 17 Oct 2004 20:21:19 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: options to shrink-wrap a perl script
Message-Id: <slrncn5l1v.img.abigail@alexandra.abigail.nl>
dan baker (botfood@yahoo.com) wrote on MMMMLXV September MCMXCIII in
<URL:news:13685ef8.0410171212.3f29430b@posting.google.com>:
:) I would like to "shrink-wrap" a simple perl utility to install on a
:) client PC. preferably something they can run without installing perl.
:) The intent is not to protect source from reverse engineering, but just
:) to simplify installation and execution by a user that doesnt need
:) *all* of perl.
:)
:) The specific application will be to create a hardwired little script
:) to FTP a couple files from a remote webserver, to a local PC, just to
:) back up a couple files without them having to know anything about FTP.
:) The plan would be to have the Windows task manager fire up the script
:) nightly, like a cron job.
:)
:) any ideas on free/cheap software to allow my to "compile" a simple
:) script into something that can be easily installed and executed in
:) Windows on a PC without installing Perl?
You're looking for PAR.
Abigail
--
$_ = "\112\165\163\1648\141\156\157\164\150\145\1628\120\145"
. "\162\1548\110\141\143\153\145\162\0128\177" and &japh;
sub japh {print "@_" and return if pop; split /\d/ and &japh}
------------------------------
Date: 17 Oct 2004 22:23:22 -0700
From: "sravi" <sravi.in@gmail.com>
Subject: overriding perl switch
Message-Id: <1098077002.510869.242450@f14g2000cwb.googlegroups.com>
I have a perl switch -w in my program
#!/usr/bin/perl -w
If i invoke this program, from the shell it is invoked with -w switch.
Is there a way i can override this? That is i should be able to invoke
this without -w switch.
If i invoke this script like this
/usr/bin/perl <script>
the -w switch is also enabled. Is there a way to override this? Please
help.
------------------------------
Date: 18 Oct 2004 05:31:27 GMT
From: John Bokma <postmaster@castleamber.com>
Subject: Re: overriding perl switch
Message-Id: <Xns95865521487Ecastleamber@130.133.1.4>
sravi wrote:
> I have a perl switch -w in my program
> #!/usr/bin/perl -w
>
> If i invoke this program, from the shell it is invoked with -w switch.
> Is there a way i can override this? That is i should be able to invoke
> this without -w switch.
>
> If i invoke this script like this
> /usr/bin/perl <script>
> the -w switch is also enabled. Is there a way to override this? Please
> help.
Your script runs with -w (use strict; is recommended afaik), so why on
Earth do you want to disable it?
Please don't tell it sometimes doesn't work with -w and hence that's the
reason you want to disable it?
--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
------------------------------
Date: 17 Oct 2004 23:21:06 -0700
From: "sravi" <sravi.in@gmail.com>
Subject: Re: overriding perl switch
Message-Id: <1098080466.768459.317630@f14g2000cwb.googlegroups.com>
my intention is not to remove -w switch(just an example) but use
someother switches, which will override the existing switch
------------------------------
Date: 18 Oct 2004 06:26:36 GMT
From: John Bokma <postmaster@castleamber.com>
Subject: Re: overriding perl switch
Message-Id: <Xns9586EAE8EF3Fcastleamber@130.133.1.4>
sravi wrote:
> my intention is not to remove -w switch(just an example) but use
> someother switches, which will override the existing switch
Please quote at least a part of the posting you are replying to.
Why on Earth do you want to override the -w switch? I guess you have an X Y
problem. You think you want X, but really you are looking for Y.
--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
------------------------------
Date: 18 Oct 2004 07:02:38 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: overriding perl switch
Message-Id: <slrncn6qke.img.abigail@alexandra.abigail.nl>
sravi (sravi.in@gmail.com) wrote on MMMMLXVI September MCMXCIII in
<URL:news:1098077002.510869.242450@f14g2000cwb.googlegroups.com>:
%% I have a perl switch -w in my program
%% #!/usr/bin/perl -w
%%
%% If i invoke this program, from the shell it is invoked with -w switch.
%% Is there a way i can override this? That is i should be able to invoke
%% this without -w switch.
%%
%% If i invoke this script like this
%% /usr/bin/perl <script>
%% the -w switch is also enabled. Is there a way to override this? Please
%% help.
$^W = 0;
See 'man perlvar'.
I do wonder why you want to turn off warnings though. That doesn't
sound like a good idea.
Abigail
--
$_ = "\x3C\x3C\x45\x4F\x54"; s/<<EOT/<<EOT/e; print;
Just another Perl Hacker
EOT
------------------------------
Date: 17 Oct 2004 11:43:54 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: Redirect with no referer...
Message-Id: <4172bd6a@news.victoria.tc.ca>
Erik Rull (webmasterspam@rdsoftware.de) wrote:
: Hi,
: I wrote a webmailer and want to "derefer" links that are clicked within
: mails, so that no session or any other param are in the referer-field of
: the target server.
: I had this attempt:
: #!/usr/bin/perl
: print "Refresh:1;URL=http://www.server.to/click.on\n\n";
: But the referer is only killed in some browsers, some versions of the
: MSIE still take the referer with.
: Bug or feature? ;-)
: Any other ideas?
You can't control the refer header cause it's sent by the browser.
Instead you could use LWP:Simple to act as a proxy. You send exactly the
headers you want the remote site to see.
Then your script receives the results and sends them back to the browser.
Hopefully the html from the remote site has embedded links that point back
to their own site so that the browser sends subsequent requests to that
site, and not back to your script. I guess you could parse the html
before you send it back to ensure there is a base statement to the remote
site to help make relative links work.
------------------------------
Date: Sun, 17 Oct 2004 19:08:24 +0000 (UTC)
From: "David H. Adler" <dha@panix.com>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <slrncn5gp7.9nq.dha@panix2.panix.com>
On 2004-10-16, Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> Austin P. So (Hae Jin) <who@what.where> wrote in comp.lang.perl.misc:
>>
>>
>> Anno Siegel wrote:
>> > Austin P. So (Hae Jin) <who@what.where> wrote in comp.lang.perl.misc:
>>
>> >>I really don't understand the fascist notion that things must be done a
>> >>certain way in order to belong to the newsgroup community.
>>
>> > Some countries go so far as to force their hapless citizens by law
>> > to drive on one paricular side of the road. Fascists! Bomb them,
>> > I say.
>>
>> Seriously, do you honestly believe that this is proper analogy? Laws
>> created to preserve the life and safety of citizens are placed on the
>> same scale as the maintenance of "stylistic merit"?
>
> Yes, it's a good analogy.
>
> Foremost, the analogy shows that there can be massive advantages in
> preferring, even enforcing, a rule that may look arbitrary to someone
> not acquainted with the territory. That is independent of the serious-
> ness of consequences if the rule is broken.
The analogy does work quite well. Let's say someone drives on the wrong
(for the local value of "wrong") side of the road, and claims they do so
because they like driving on that side better. Exactly the same
situation. The difference is that here, someone may get verbally flamed
or killfiled while, on the road, some one can get killed.
If one wanted to take the analogy a step further, those telling people
not to top-post are equivalent to people on the road going "Hey, you're
going to cause an accident!"
The fact that the *consequenses* of driving "wrong" are worse than those
of top-posting doesn't make the analogy flawed. Just less important in
the grand scheme of things.
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
SURF MUSIC makes EVERYTHING better! - Tom Servo
------------------------------
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 7264
***************************************