[28347] in Perl-Users-Digest
Perl-Users Digest, Issue: 9711 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 11 06:10:20 2006
Date: Mon, 11 Sep 2006 03:10:11 -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, 11 Sep 2006 Volume: 10 Number: 9711
Today's topics:
Failed installing Win32::DirSize on Windows XP <lev.weissman@creo.com>
Re: Failed installing Win32::DirSize on Windows XP <thepoet_nospam@arcor.de>
Re: Failed installing Win32::DirSize on Windows XP <sisyphus1@nomail.afraid.org>
Re: Failed installing Win32::DirSize on Windows XP <sisyphus1@nomail.afraid.org>
gah! <don@mastah.com>
Re: gah! <thepoet_nospam@arcor.de>
Re: gah! <bik.mido@tiscalinet.it>
How to extract all link from web page (loaded in variab <maran@homewares.ro>
Re: How to extract all link from web page (loaded in va <josef.moellers@fujitsu-siemens.com>
Re: localtime is now wrong after server change <tintin@invalid.invalid>
Re: need to clear cookies in IE using perl Win 32 IE au <mgarrish@gmail.com>
new CPAN modules on Mon Sep 11 2006 (Randal Schwartz)
Re: scalar to method name anno4000@radom.zrz.tu-berlin.de
Re: scalar to method name <rvtol+news@isolution.nl>
Re: Tk::Checkbutton - text does not line up ... <lev.weissman@creo.com>
what does underscore stands for ? <youknows@gmail.com>
Re: what does underscore stands for ? <bik.mido@tiscalinet.it>
Re: what does underscore stands for ? <youknows@gmail.com>
Re: what does underscore stands for ? <youknows@gmail.com>
Re: what does underscore stands for ? <josef.moellers@fujitsu-siemens.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 11 Sep 2006 00:10:53 -0700
From: "MoshiachNow" <lev.weissman@creo.com>
Subject: Failed installing Win32::DirSize on Windows XP
Message-Id: <1157958653.262837.67010@i3g2000cwc.googlegroups.com>
Hi,
Tried installing the Win32::DirSize module on my Windows XP using CPAN-
-failed due to lack of C-compiler.
When searching for it using ppm - it does not seem to find it.
Could anybody advise ?
Thanks
------------------------------
Date: Mon, 11 Sep 2006 09:37:04 +0200
From: Christian Winter <thepoet_nospam@arcor.de>
Subject: Re: Failed installing Win32::DirSize on Windows XP
Message-Id: <45051220$0$18495$9b4e6d93@newsspool3.arcor-online.net>
MoshiachNow wrote:
> Hi,
> Tried installing the Win32::DirSize module on my Windows XP using CPAN-
> -failed due to lack of C-compiler.
> When searching for it using ppm - it does not seem to find it.
>
> Could anybody advise ?
For Perl 5.8.7 (AS Perl build 813) it's there, but for the older
5.8.3 (build 809) it's missing from the repository.
Doing "repos add BdP http://www.bribes.org/perl/ppm"
within ppm should help you (and provide some more packages
that the original ActiveState repository is missing).
(At this point: thanks to J-L Morel for saving us quite a bit
of compiling work).
HTH
-Chris
------------------------------
Date: Mon, 11 Sep 2006 17:35:25 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Failed installing Win32::DirSize on Windows XP
Message-Id: <450512ac$0$5109$afc38c87@news.optusnet.com.au>
"MoshiachNow" <lev.weissman@creo.com> wrote in message
news:1157958653.262837.67010@i3g2000cwc.googlegroups.com...
> Hi,
> Tried installing the Win32::DirSize module on my Windows XP using CPAN-
> -failed due to lack of C-compiler.
> When searching for it using ppm - it does not seem to find it.
>
ppm install http://www.bribes.org/perl/ppm/Win32-DirSize.ppd
See http://www.bribes.org/perl/ppmdir.html for a complete listing of ppm
packages available from there.
Cheers,
Rob
------------------------------
Date: Mon, 11 Sep 2006 18:25:30 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Failed installing Win32::DirSize on Windows XP
Message-Id: <45051e69$0$22358$afc38c87@news.optusnet.com.au>
"Christian Winter" <thepoet_nospam@arcor.de> wrote in message
news:45051220$0$18495$9b4e6d93@newsspool3.arcor-online.net...
> MoshiachNow wrote:
> > Hi,
> > Tried installing the Win32::DirSize module on my Windows XP using CPAN-
> > -failed due to lack of C-compiler.
> > When searching for it using ppm - it does not seem to find it.
> >
> > Could anybody advise ?
>
> For Perl 5.8.7 (AS Perl build 813) it's there, but for the older
> 5.8.3 (build 809) it's missing from the repository.
> Doing "repos add BdP http://www.bribes.org/perl/ppm"
> within ppm should help you (and provide some more packages
> that the original ActiveState repository is missing).
> (At this point: thanks to J-L Morel for saving us quite a bit
> of compiling work).
>
> HTH
> -Chris
According to http://ppm.activestate.com/BuildStatus/5.8-W.html version 1.13
failed to build for ActiveState. If you click on the "FAIL" link you'll find
the reason being:
Can't open perl script "Makefile.PL": No such file or directory
There's something odd about that distro. If you go to
http://search.cpan.org/~arich/Win32-DirSize-1.13/ there's no mention there
of anything other than a readme and a pm file. Normally there would be a
link to the Manifest and the Makefile.PL (among others). Perhaps that has
somehow led to the ActiveState automated build procedure failing to find the
Makefile.PL (which is definitely present in the distro).
Weird ...
Cheers,
Rob
------------------------------
Date: Mon, 11 Sep 2006 08:05:26 +0100
From: "Don Corleone" <don@mastah.com>
Subject: gah!
Message-Id: <RdKdnRWayYxyl5jYRVnytw@giganews.com>
Thanks for some of the comments.
In a nutshell this is what i am trying to make the program do:
1. get a directory name (works ok)
2. Get a list of all the tif files in this directory (works ok)
3. perform a msdos file operation on each file returned by 2 above (doesnt
work).
thats it. I dont get why 3 isnt working, any help appreciated.
thanks
------------------------------
Date: Mon, 11 Sep 2006 09:21:07 +0200
From: Christian Winter <thepoet_nospam@arcor.de>
Subject: Re: gah!
Message-Id: <45050e63$0$5145$9b4e6d93@newsspool1.arcor-online.net>
Don Corleone wrote:
> Thanks for some of the comments.
Which comments? Those you are going to get?
Oh, sorry, you are refering to a completely separate thread.
My fault that I didn't see the connection between "gah!" and
"exec command issue" at once...
> In a nutshell this is what i am trying to make the program do:
>
> 1. get a directory name (works ok)
> 2. Get a list of all the tif files in this directory (works ok)
> 3. perform a msdos file operation on each file returned by 2 above (doesnt
> work).
>
> thats it. I dont get why 3 isnt working, any help appreciated.
Would you have shown us the code (and the _exact_ one, while we
are at that) you are using, we might be able to help you.
You still didn't read the posting guidelines to this group that
Tad recommended to you, did you?
-Chris
------------------------------
Date: 11 Sep 2006 11:49:43 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: gah!
Message-Id: <i3cag2l6h9h1jvegn01mdqfg68h5noq32a@4ax.com>
On Mon, 11 Sep 2006 08:05:26 +0100, "Don Corleone" <don@mastah.com>
wrote:
>Subject: gah!
You've already been requested to read the posting guidelines for the
group. *Please* put the subject of your post in the Subject: line -
not that one should need to read the guidelines to know that it would
be more effective, IMHO.
>Thanks for some of the comments.
About what?!? (Yes, I *do* know, but that's not the point.)
>In a nutshell this is what i am trying to make the program do:
[snip]
You know, reposting the exact same question in another thread is not
going to help you.
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, 11 Sep 2006 10:47:19 +0200
From: <maran@homewares.ro>
Subject: How to extract all link from web page (loaded in variable $content) to scalar @links?
Message-Id: <ee37qb$9p2$1@ss408.t-com.hr>
How to extract all link from web page (loaded in variable $content) to
scalar @links?
------------------------------
Date: Mon, 11 Sep 2006 10:57:36 +0200
From: Josef Moellers <josef.moellers@fujitsu-siemens.com>
Subject: Re: How to extract all link from web page (loaded in variable $content) to scalar @links?
Message-Id: <ee38ij$bbh$2@nntp.fujitsu-siemens.com>
maran@homewares.ro wrote:
> How to extract all link from web page (loaded in variable $content) to
> scalar @links?
Write code to do it, preferably in Perl! Then run it on your computer.
--=20
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
Date: Mon, 11 Sep 2006 21:47:10 +1200
From: "Tintin" <tintin@invalid.invalid>
Subject: Re: localtime is now wrong after server change
Message-Id: <45052380$0$19661$88260bb3@free.teranews.com>
"Jason" <jwcarlton@gmail.com> wrote in message
news:1157899110.648602.211210@b28g2000cwb.googlegroups.com...
> Until recently, my site was on a remote-hosted shared server; as of
> today, I've completely upgraded to a dedicated.
>
> I use to use the following to determine the timestamp for my forum:
>
> ($sec, $min, $hour, $day, $mon, $year, $wday) = (localtime(time +
> (60*60)))[0,1,2,3,4,5,6];
> $month = $mon + 1;
> $year += 1900;
>
> $today = "$year";
> if ($month < 10) { $today .= "0"; }
> $today .= "$month";
> if ($day < 10) { $today .= "0"; }
> $today .= "$day";
>
> if ($hour < 10) { $hour = "0" . $hour; }
> if ($min < 10) { $min = "0" . $min; }
> if ($sec < 10) { $sec = "0" . $sec; }
>
> $thistimestamp = $year . $month . $day . $hour . $min . $sec; # eg,
> 20060910040541
>
>
> But after my server change, my hour is now an hour greater than it
> should be (if it's 10am, this code states that it's 11am). I can't
> figure out why, though, because through WHM, my server time matches my
> local time.
>
> What's the quickest way to decrease this code by an hour? Currently,
> all posts in my forum are going to have to be corrected by hand (and I
> get, on average, 1 post every 3 minutes), so I'm more concerned with
> modifying the code quickly than anything else.
Replace the entire awful code above with
use POSIX 'strftime';
my $thistimestamp = "%Y%m%d%H%M%S",localtime;
Much easier on the eye.
--
Posted via a free Usenet account from http://www.teranews.com
Warning: Do not use Ultimate-Anonymity
They are worthless spammers that are running a scam.
------------------------------
Date: 10 Sep 2006 17:46:13 -0700
From: "Matt Garrish" <mgarrish@gmail.com>
Subject: Re: need to clear cookies in IE using perl Win 32 IE automation
Message-Id: <1157935573.220437.77140@b28g2000cwb.googlegroups.com>
vish.chitnis@gmail.com wrote:
> hi there,
>
> i am beginer in perl and i need to clear IE cookies and temporary
> internet files before i call goto URl to access my application url. how
> can i clear cookies and temp internet files?
>
I have no idea what calling goto URI is, but the fastest way I can
think of to clear the cache would be to just delete everything in
C:\Documents and Settings\<<current user>>\Local Settings\Temporary
Internet Files
where the current user obviously is you. First choices would just be to
shell out and do a del from your script or use File::Find to traverse
the directory and delete files as you go.
If the location is variable, you can always get the cache directories
from the registry in
HKLM\Software\MIcrosoft\Windows\CurrentVersion\Internet Settings\Cache
(on XP anyway).
Matt
------------------------------
Date: Mon, 11 Sep 2006 04:42:10 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Mon Sep 11 2006
Message-Id: <J5EvqA.1u8A@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
Acme-MetaSyntactic-0.91
http://search.cpan.org/~book/Acme-MetaSyntactic-0.91/
Themed metasyntactic variables names
----
CPAN-1.87_61
http://search.cpan.org/~andk/CPAN-1.87_61/
query, download and build perl modules from CPAN sites
----
Calendar-Simple-1.14
http://search.cpan.org/~davecross/Calendar-Simple-1.14/
Perl extension to create simple calendars
----
Chart-Clicker-1.0.6
http://search.cpan.org/~gphat/Chart-Clicker-1.0.6/
Powerful, extensible charting.
----
Declare-Constraints-Simple-0.02
http://search.cpan.org/~phaylon/Declare-Constraints-Simple-0.02/
Declarative Validation of Data Structures
----
File-Find-Rule-PPI-0.05
http://search.cpan.org/~adamk/File-Find-Rule-PPI-0.05/
Add support for PPI queries to File::Find::Rule
----
Filter-Simple-Compile-0.02
http://search.cpan.org/~audreyt/Filter-Simple-Compile-0.02/
Drop-in replacement to Filter::Simple
----
Games-Mastermind-0.03
http://search.cpan.org/~book/Games-Mastermind-0.03/
A simple framework for MasterMind games
----
Graph-0.80
http://search.cpan.org/~jhi/Graph-0.80/
graph data structures and algorithms
----
HTML-Perlinfo-1.44
http://search.cpan.org/~accardo/HTML-Perlinfo-1.44/
Display a lot of Perl information in HTML format
----
Handel-0.99_11
http://search.cpan.org/~claco/Handel-0.99_11/
Simple commerce framework with AxKit/TT/Catalyst support
----
Lingua-Han-Cantonese-0.04
http://search.cpan.org/~fayland/Lingua-Han-Cantonese-0.04/
Retrieve the Cantonese(GuangDongHua) of Chinese character(HanZi).
----
Lingua-Han-PinYin-0.07
http://search.cpan.org/~fayland/Lingua-Han-PinYin-0.07/
Retrieve the Mandarin(PinYin) of Chinese character(HanZi).
----
Lingua-Han-Stroke-0.05
http://search.cpan.org/~fayland/Lingua-Han-Stroke-0.05/
Retrieve the stroke count of Chinese character.
----
Mail-SpamCannibal-0.72
http://search.cpan.org/~miker/Mail-SpamCannibal-0.72/
A tool to stop SPAM
----
Mail-SpamCannibal-0.73
http://search.cpan.org/~miker/Mail-SpamCannibal-0.73/
A tool to stop SPAM
----
Mail-Summary-Tools-0.05
http://search.cpan.org/~nuffin/Mail-Summary-Tools-0.05/
Tools for mailing list summarization.
----
Module-Mask-Deps-0.04
http://search.cpan.org/~mattlaw/Module-Mask-Deps-0.04/
Mask modules not listed as dependencies
----
Net-Amazon-S3-0.34
http://search.cpan.org/~lbrocard/Net-Amazon-S3-0.34/
Use the Amazon S3 - Simple Storage Service
----
Net-Amazon-S3-0.35
http://search.cpan.org/~lbrocard/Net-Amazon-S3-0.35/
Use the Amazon S3 - Simple Storage Service
----
Net-Amazon-S3-0.36
http://search.cpan.org/~lbrocard/Net-Amazon-S3-0.36/
Use the Amazon S3 - Simple Storage Service
----
Net-Connection-Sniffer-0.15
http://search.cpan.org/~miker/Net-Connection-Sniffer-0.15/
gather stats on network connections
----
Net-Connection-Sniffer-0.16
http://search.cpan.org/~miker/Net-Connection-Sniffer-0.16/
gather stats on network connections
----
Net-Connection-Sniffer-0.17
http://search.cpan.org/~miker/Net-Connection-Sniffer-0.17/
gather stats on network connections
----
POE-Component-Server-DNS-0.01
http://search.cpan.org/~bingos/POE-Component-Server-DNS-0.01/
non-blocking, concurrent DNS server component
----
POE-Filter-CSV-1.02
http://search.cpan.org/~bingos/POE-Filter-CSV-1.02/
A POE-based parser for CSV based files.
----
POE-Filter-IRCD-2.0
http://search.cpan.org/~bingos/POE-Filter-IRCD-2.0/
A POE-based parser for the IRC protocol.
----
POE-Filter-LZF-1.4
http://search.cpan.org/~bingos/POE-Filter-LZF-1.4/
A POE filter wrapped around Compress::LZF
----
POE-Filter-LZO-1.4
http://search.cpan.org/~bingos/POE-Filter-LZO-1.4/
A POE filter wrapped around Compress::LZO
----
POE-Filter-LZW-1.4
http://search.cpan.org/~bingos/POE-Filter-LZW-1.4/
A POE filter wrapped around Compress::LZW
----
POE-Filter-Zlib-1.6
http://search.cpan.org/~bingos/POE-Filter-Zlib-1.6/
A POE filter wrapped around Compress::Zlib
----
Perl-Repository-APC-1.216
http://search.cpan.org/~andk/Perl-Repository-APC-1.216/
Class modelling "All Perl Changes" repository
----
Pod-XML-0.98
http://search.cpan.org/~mwilson/Pod-XML-0.98/
Module to convert POD to XML
----
RRDTool-OO-0.17
http://search.cpan.org/~mschilli/RRDTool-OO-0.17/
Object-oriented interface to RRDTool
----
Task-Sites-ShlomiFish-0.0201
http://search.cpan.org/~shlomif/Task-Sites-ShlomiFish-0.0201/
Specifications for modules needed by the homesite of Shlomi Fish. =cut
----
WWW-Myspace-0.56
http://search.cpan.org/~grantg/WWW-Myspace-0.56/
Access MySpace.com profile information from Perl
----
WebService-YouTube-0.02
http://search.cpan.org/~yoshida/WebService-YouTube-0.02/
Perl interfece to YouTube
----
XML-FeedPP-0.16
http://search.cpan.org/~kawasaki/XML-FeedPP-0.16/
Parse/write/merge/edit web feeds, RSS/RDF/Atom
----
iCal-Parser-1.12
http://search.cpan.org/~rfrankel/iCal-Parser-1.12/
Parse iCalendar files into a data structure
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 11 Sep 2006 08:06:26 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: scalar to method name
Message-Id: <4mkjo2F6jadeU1@news.dfncis.de>
Peter J. Holzer <hjp-usenet2@hjp.at> wrote in comp.lang.perl.misc:
> On 2006-09-10 19:13, anno4000@radom.zrz.tu-berlin.de
> <anno4000@radom.zrz.tu-berlin.de> wrote:
> > Peter J. Holzer <hjp-usenet2@hjp.at> wrote in comp.lang.perl.misc:
> >> On 2006-09-10 16:42, anno4000@radom.zrz.tu-berlin.de
> >> <anno4000@radom.zrz.tu-berlin.de> wrote:
> > Well, there you are. When the program needs taint checking, treat
> > *every* content that doesn't come from the source as suspect.
>
> Yes, every content from untrusted sources is suspect, but not every
> operation on suspect content is unsafe. I think I (and probably Randal)
> misunderstood your question "Why does $method need special attention?"
>
> To recap, the code in question was $obj->$method(@args).
>
> I understood your question as "why does calling a method with a user
> supplied name need special attention?" and the reason has been explained
> by Randal: You cannot call only methods of $obj's class but arbitrary
> objects that way. So if you want to restrict the user to call only
^^^^^^^
methods
> $obj's class you have to check $method before the call.
>
> OTOH, calling a method with unchecked arguments is not inherently
> unsafe: The method can (and should) check the arguments.
I isn't always immediately obvious what is safe. Take $obj in the
expression above. If what the user can put there is always an object
of an expected class, all is fine. If the user has a way to put an
arbitrary string there, methods in unexpected classes can be called
(as class methods).
> > This is exactly what taint checking tries to do, though not always
> > perfectly as your example below (now snipped) shows. Thus the problem
> > can be reduced to deciding whether a program needs taint checking.
>
> I was assuming a context which needs taint checking. Otherwise its
> perfectly fine if you can call arbirtrary methods.
>
> > I don't have a pat answer to that, though I think programmers develop
> > a reliable intuition in that respect. The question can't be decided
> > by looking at the program alone.
>
> Right. The question can be decided by looking at the context in which
> the program is executed: If the entity running the program does not
> completely trust the entities supplying the input data, the data has to
> be checked (that doesn't mean taint checking is needed: Taint checking
> is just a tool to help the programmer to find places where he needs to
> add checks).
That leaves "entity" and "trust" to be defined.
Anno
------------------------------
Date: Mon, 11 Sep 2006 10:56:40 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: scalar to method name
Message-Id: <ee3fha.9k.1@news.isolution.nl>
Oobi Van Doobi schreef:
> I have an xml source, which includes names of
> modules and methods in the modules. For example
>
> <action>
> <module>
> some_module
> </module>
> <method>
> some_method
> </method>
> </action>
>
> now, I need to be able to execute some_module::some_method. The
> problem is that the names are scalars, and I want to convert the
> scalars to code "names".
>
> As for now I have the names of module and method as:
> \&{$module::$method}.
> But, trying to execute the above I get errors.
> What is the correct way of doing this?
Use a hash.
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: 11 Sep 2006 00:21:18 -0700
From: "MoshiachNow" <lev.weissman@creo.com>
Subject: Re: Tk::Checkbutton - text does not line up ...
Message-Id: <1157959278.778432.173950@d34g2000cwd.googlegroups.com>
> In addition you might consider using a fixed-width font to have the second part
> of your label aligned vertically as well:
Thanks !
This worked like magic !!
------------------------------
Date: 10 Sep 2006 23:37:48 -0700
From: "alpha_beta_release" <youknows@gmail.com>
Subject: what does underscore stands for ?
Message-Id: <1157956668.688761.85840@m73g2000cwd.googlegroups.com>
HI
what does underscore stands for ?
e.g. get file modification time, someone write like this
-M _
what i understand is it's treated as bareword (filehandle and labels).
Is it default filehandle, like $_ (for scalar)?
or maybe i'm wrong. I need some explanation...
Thanx in advance.
------------------------------
Date: 11 Sep 2006 09:58:45 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: what does underscore stands for ?
Message-Id: <lo5ag21t46e8u89d1qt58m8t0k0ur1fl04@4ax.com>
On 10 Sep 2006 23:37:48 -0700, "alpha_beta_release"
<youknows@gmail.com> wrote:
>what does underscore stands for ?
>e.g. get file modification time, someone write like this
> -M _
Check
perldoc -f -X
towards the end.
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: 11 Sep 2006 01:13:46 -0700
From: "alpha_beta_release" <youknows@gmail.com>
Subject: Re: what does underscore stands for ?
Message-Id: <1157962415.391508.158100@p79g2000cwp.googlegroups.com>
ok. thanx. actually i've gone through this section, and forgot to
mention about the solitary underscore ;) but what i need is the
explanation about this special filehandle _. What it's purpose?
Michele Dondi wrote:
> On 10 Sep 2006 23:37:48 -0700, "alpha_beta_release"
> <youknows@gmail.com> wrote:
>
> >what does underscore stands for ?
> >e.g. get file modification time, someone write like this
> > -M _
>
> Check
>
> perldoc -f -X
>
> towards the end.
>
>
> 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: 11 Sep 2006 01:26:28 -0700
From: "alpha_beta_release" <youknows@gmail.com>
Subject: Re: what does underscore stands for ?
Message-Id: <1157963188.557051.151510@i3g2000cwc.googlegroups.com>
ok. i understand something.
What i found is that if we provide this '_' to the second (and
subsequent) file test operations (-M, -f etc), the result returned is
from the first test operation. Am i correct?
e.g.
-f $somefile;
-M _ ; # use the result of above operation
-t $somefile; # fresh call
-M _ ; # use the result of above operation
Actually i found this in Dir::Purge.pm, makes me wonder for while. It's
no very clear at first. Anyway thanks Michele for the pointer.
Michele Dondi wrote:
> On 10 Sep 2006 23:37:48 -0700, "alpha_beta_release"
> <youknows@gmail.com> wrote:
>
> >what does underscore stands for ?
> >e.g. get file modification time, someone write like this
> > -M _
>
> Check
>
> perldoc -f -X
>
> towards the end.
>
>
> 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, 11 Sep 2006 10:55:41 +0200
From: Josef Moellers <josef.moellers@fujitsu-siemens.com>
Subject: Re: what does underscore stands for ?
Message-Id: <ee38ev$bbh$1@nntp.fujitsu-siemens.com>
alpha_beta_release wrote:
> ok. i understand something.
>=20
> What i found is that if we provide this '_' to the second (and
> subsequent) file test operations (-M, -f etc), the result returned is
> from the first test operation. Am i correct?
> e.g.
> -f $somefile;
> -M _ ; # use the result of above operation
>=20
> -t $somefile; # fresh call
> -M _ ; # use the result of above operation
It uses an _internal_ _intermediate_ result from the previous operation.
When you do "-f $somefile", then the fact that $somefile is or is not a=20
plain file does not appear out of thin air but the perl runtime has to=20
perform a "stat" operation on $somefile which returns muchmuch more than =
just an indicator on the file type (see perldoc -f stat), so it is an=20
optimization to keep the internal result of the internal stat operation=20
for later reference.
"-M _" will then not have to do a new "stat" but can just pick up the=20
modification time from the data returned by the "stat" done for the "-f=20
$somefile".
HTH,
--=20
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
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 9711
***************************************