[30939] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2184 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 5 14:09:48 2009

Date: Thu, 5 Feb 2009 11:09:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 5 Feb 2009     Volume: 11 Number: 2184

Today's topics:
    Re: error printing page using LWP::Simple <syscjm@sumire.gwu.edu>
        Getting system info using perl <saurabh.hirani@gmail.com>
    Re: Getting system info using perl <Peter@PSDT.com>
    Re: Getting system info using perl <peter@makholm.net>
    Re: Getting system info using perl <saurabh.hirani@gmail.com>
    Re: Getting system info using perl <saurabh.hirani@gmail.com>
    Re: Perl Peeves <tadmc@seesig.invalid>
    Re: programming by evolution? <xahlee@gmail.com>
    Re: Regular Expression Help? <bruce-usenet@noreplybicycle.synonet.comnoreply>
        unable to delete a file <cartercc@gmail.com>
    Re: unable to delete a file <tadmc@seesig.invalid>
    Re: unable to delete a file <noreply@gunnar.cc>
    Re: unable to delete a file <tim@burlyhost.com>
    Re: unable to delete a file <thepoet_nospam@arcor.de>
    Re: unable to delete a file <cartercc@gmail.com>
    Re: what is the best way to convert a formatted time to <noreply@gunnar.cc>
    Re: what is the best way to convert a formatted time to <syscjm@sumire.gwu.edu>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 05 Feb 2009 07:43:31 -0600
From: Chris Mattern <syscjm@sumire.gwu.edu>
Subject: Re: error printing page using LWP::Simple
Message-Id: <slrngolr82.544.syscjm@sumire.gwu.edu>

On 2009-02-05, Larry Gates <larry@example.invalid> wrote:
>
>  # use strict;

Why?

-- 
             Christopher Mattern

NOTICE
Thank you for noticing this new notice
Your noticing it has been noted
And will be reported to the authorities


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

Date: Thu, 5 Feb 2009 03:37:52 -0800 (PST)
From: saurabh hirani <saurabh.hirani@gmail.com>
Subject: Getting system info using perl
Message-Id: <dc3172f3-9d17-4ca4-804c-33c017ea3ec9@p2g2000prn.googlegroups.com>

Hey all,

I am writing a daemon in perl which will check for load average, free
disk space on a particular partition and free memory and send it as an
updation query to another daemon.

I am supposed to check for these params at least twice in a minute. I
was looking at perl modules which would give me this info - but after
looking under their hood - most of them fire system command to launch
a shell. Some of them do it via /proc which I would rather do myself.
My queries are

1. What is faster - reading /proc/loadavg or uptime? I would say /proc/
loadavg.

2. Are there any perl modules which are using XS to get these queries
done faster without opening a shell?

3. Load average I can get through /proc/loadavg, free memory through /
proc/meminfo. But how to obtain free disk space through proc? I am
talking about 2.6.x kernels on RHEL4. I want to use /proc as much as I
can because I would be reading from a file and not launching a shell.

Are there any other suggestions that you guys think would be useful in
writing such daemons which do frequent updates? Thanks for going
through my post.


regards,
Saurabh.


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

Date: Thu, 05 Feb 2009 11:52:09 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: Getting system info using perl
Message-Id: <JpAil.2732$WT.2617@newsfe22.iad>

On Thu, 05 Feb 2009 03:37:52 -0800, saurabh hirani wrote:
> I am writing a daemon in perl which will check for load average, free
> disk space on a particular partition and free memory and send it as an
> updation query to another daemon.
> 
> I am supposed to check for these params at least twice in a minute. I
> was looking at perl modules which would give me this info - but after
> looking under their hood - most of them fire system command to launch a
> shell. Some of them do it via /proc which I would rather do myself. My
> queries are
> 
> 1. What is faster - reading /proc/loadavg or uptime? I would say /proc/
> loadavg.
> 
> 2. Are there any perl modules which are using XS to get these queries
> done faster without opening a shell?

The module Sys::Cpuload claims to do what you want:

http://search.cpan.org/~clintdw/Sys-CpuLoad-0.03/CpuLoad.pm

I haven't tried it myself.  Inspection shows it only uses XS on BSDish 
systems, and inspects /prov/loadavg on Linux.  Seems like a good starting 
place though.

Twice a minute isn't exactly onerous for running a short child process 
IMHO.  Twice a second and I'd worry.

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/


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

Date: Thu, 05 Feb 2009 13:28:40 +0100
From: Peter Makholm <peter@makholm.net>
Subject: Re: Getting system info using perl
Message-Id: <87wsc5cbk7.fsf@vps1.hacking.dk>

saurabh hirani <saurabh.hirani@gmail.com> writes:

> 3. Load average I can get through /proc/loadavg, free memory through /
> proc/meminfo. But how to obtain free disk space through proc? I am
> talking about 2.6.x kernels on RHEL4. I want to use /proc as much as I
> can because I would be reading from a file and not launching a shell.

Using Linux::SysInfo should be even faster than reading and parsing
two files in /proc. This module is a simple wrapper around the
Linux-specific sysinfo()-system call.

Free disk space can be detected by Filesys::Df which is a wrapper
around the statfs() or statvfs() systemcalls. Again a wee bit faster
than opening a file and parsing the values.

Filesys::Df should be portable on POSIX systems, but Linux::SysInfo is
linux-only. But reading anything directly from /proc/ would also be
very linux-specific.
 
//Makholm


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

Date: Thu, 5 Feb 2009 07:44:03 -0800 (PST)
From: saurabh hirani <saurabh.hirani@gmail.com>
Subject: Re: Getting system info using perl
Message-Id: <19d72ab0-1d8f-4ba5-a31c-dcbedae03af9@v39g2000pro.googlegroups.com>

On Feb 5, 4:52=A0pm, Peter Scott <Pe...@PSDT.com> wrote:
> On Thu, 05 Feb 2009 03:37:52 -0800, saurabh hirani wrote:
> > I am writing a daemon in perl which will check for load average, free
> > disk space on a particular partition and free memory and send it as an
> > updation query to another daemon.
>
> > I am supposed to check for these params at least twice in a minute. I
> > was looking at perl modules which would give me this info - but after
> > looking under their hood - most of them fire system command to launch a
> > shell. Some of them do it via /proc which I would rather do myself. My
> > queries are
>
> > 1. What is faster - reading /proc/loadavg or uptime? I would say /proc/
> > loadavg.
>
> > 2. Are there any perl modules which are using XS to get these queries
> > done faster without opening a shell?
>
> The module Sys::Cpuload claims to do what you want:
>
> http://search.cpan.org/~clintdw/Sys-CpuLoad-0.03/CpuLoad.pm
>
> I haven't tried it myself. =A0Inspection shows it only uses XS on BSDish
> systems, and inspects /prov/loadavg on Linux. =A0Seems like a good starti=
ng
> place though.

Thanks. I started with that only. After looking at the code, I saw
that I could do that without including the module. So I wrote my own
code to do thatt.

>
> Twice a minute isn't exactly onerous for running a short child process
> IMHO. =A0Twice a second and I'd worry.

That is what I was thinking about. But I actually don't know the
frequency. It can also be once in 5 seconds.


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

Date: Thu, 5 Feb 2009 07:50:39 -0800 (PST)
From: saurabh hirani <saurabh.hirani@gmail.com>
Subject: Re: Getting system info using perl
Message-Id: <323ed121-6261-404b-a8f8-31ef0f4697a8@w39g2000prb.googlegroups.com>

On Feb 5, 5:28=A0pm, Peter Makholm <pe...@makholm.net> wrote:
> saurabh hirani <saurabh.hir...@gmail.com> writes:
> > 3. Load average I can get through /proc/loadavg, free memory through /
> > proc/meminfo. But how to obtain free disk space through proc? I am
> > talking about 2.6.x kernels on RHEL4. I want to use /proc as much as I
> > can because I would be reading from a file and not launching a shell.
>
> Using Linux::SysInfo should be even faster than reading and parsing
> two files in /proc. This module is a simple wrapper around the
> Linux-specific sysinfo()-system call.
>
> Free disk space can be detected by Filesys::Df which is a wrapper
> around the statfs() or statvfs() systemcalls. Again a wee bit faster
> than opening a file and parsing the values.
>
> Filesys::Df should be portable on POSIX systems, but Linux::SysInfo is
> linux-only. But reading anything directly from /proc/ would also be
> very linux-specific.

Thanks Peter. That was really useful. I will be using these modules -
for their speed, ease of use and options provided which might be
useful in the future. My daemon is not going to bomb update queries to
the other daemon as frequently as once a second, but these modules
really do pump up the speed from okay to burn-the-road. Just to
compare system call and Filesys::Df, I wrote a small perl program
which calls getting free disk using system call to df and using the
module. I profiled them by running them around 1000 times and this was
the output of dprofpp:

Forking df and getting the time:

Total Elapsed Time =3D 42.04899 Seconds
  User+System Time =3D 5.668994 Seconds
Inclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 96.7   5.485  5.485   1000   0.0055 0.0055  main::get_freequeue


Using df from the module
Total Elapsed Time =3D 0.618107 Seconds
  User+System Time =3D 0.768107 Seconds
Inclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 92.1   0.013  0.708   1000   0.0000 0.0007  main::get_freequeue
 90.4   0.013  0.695   1000   0.0000 0.0007  Filesys::Df::df
 88.7   0.682  0.682   1000   0.0007 0.0007  Filesys::Df::_df

The difference is staggering.

Thanks again guys for your viewpoints. They really helped.

regards,
Saurabh




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

Date: Thu, 5 Feb 2009 06:32:07 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Perl Peeves
Message-Id: <slrngoln27.sl3.tadmc@tadmc30.sbcglobal.net>

Bruce Cook <bruce-usenet@noreplybicycle.synonet.comnoreply> wrote:
> Hans Mulder wrote:


>> The regular documentation does not admit it, but a Perl scalar can have
       ^^^^^^^^^^^^^^^^^^^^^
>> a numeric value and a string value simultaneously, and the two need not
>> match.


>> The magic variable $! tends to contain more wildly mismatching values.
>> For example:
>> 
>>      open my $fh, '<', "blah blah blah";
>>      printf "Numeric: %d, String: '%s'\n", $!, $!;
>> 
>> prints (on my system):
>> 
>>      Numeric value: 2, String value: 'No such file or directory'
>
> I hadn't realized this, that's a really neat feature !


For those playing along at home, the "irregular" documentation  :-)
admits this duality in the "Double-Typed SVs" section of perlguts.pod.


>> If you want to create your own mismatching scalars, you can use the
>> function dualvar in the module Scalar::Util
>> 
>>      use Scalar::Util 'dualvar';
>> 
>>      my $t = dualvar(1, "True");
>>      printf "Numeric value: %d, String value: '%s'\n", $t, $t;
>> 
>> prints:
>> 
>>      Numeric value: 1, String value: 'True'
>> 
>> Incidentally, 'dualvar' is a misnomer: it returns dual values, not dual
>> variables.
>
> I assume that knows about numeric vs string operators (== vs eq) 


Yes. These both make output:

    print "numeric true\n" if $t == 10 - 9;
    print "string true\n" if $t eq 'Tr' . 'ue';


> and would 
> use the string value on assignment ?


Err, no, the duality is preserved on assignment:

    my $other = $t;
    printf "Numeric value: %d, String value: '%s'\n", $other, $other;


> I was aware of functions that returned either scalar or array 


Functions return either a scalar or a *list*.


> depending upon 
> how they're called:
> 	@foo= (scalar) time();	#Returns a single epoch
> vs	@foo= time();	# returns the components hour:min:sec etc


Assignment determines the context of its RHS from whatever is
on its LHS (see "Context" in perldata.pod) so your 1st example
above can be written more simply:

   $foo = time();  #Returns a single epoch


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Thu, 5 Feb 2009 00:47:56 -0800 (PST)
From: Xah Lee <xahlee@gmail.com>
Subject: Re: programming by evolution?
Message-Id: <03db1c69-828a-4961-914d-62fe10ed88fb@w39g2000prb.googlegroups.com>

looking at the eXtreme Programing fuckheads's traffic history:
http://groups.google.com/group/comp.software.extreme-programming/about

for those who are not aware, it was one of the snake oil wildly
popular in around 2001.

  Xah
=E2=88=91 http://xahlee.org/

=E2=98=84


Jason wrote:
I just started reading OnLisp and hit this quote:

Why wait for hindsight? As Montaigne found, nothing clarifies your
ideas like trying to write them down. Once you=E2=80=99re freed from the wo=
rry
that you=E2=80=99ll paint yourself into a corner, you can take full advanta=
ge
of this possibility. The ability to plan programs as you write them
has two momentous consequences: programs take less time to write,
because when you plan and write at the same time, you have a real
program to focus your attention; and they turn out better, because the
final design is always a product of evolution. So long as you maintain
a certain discipline while searching for your program=E2=80=99s destiny=E2=
=80=94so
long as you always rewrite mistaken parts as soon as it becomes clear
that they=E2=80=99re mistaken=E2=80=94the final product will be a program m=
ore elegant
than if you had spent weeks planning it beforehand.

I've always heard "design is 90% of the job. You have to have a good
design in place before writing anything."

This quote from OnLisp is a radical paradigm for me (being an engineer
who designs things). My question to you is does this apply in
practice? In the real world when the rubber hits the road, can you
program this way and develop good software used by lots of people?


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

On Feb 4, 10:36 pm, Xah Lee <xah...@gmail.com> wrote:

yes and no. The problem is that such opinion is not a scientific
opinion. It can't be verified or denied.

Any dynamic lang, such as Python, PHP, Ruby, Mathematica can be said
the same thing. And, prob more so for functional langs.

The langs that this cannot be done, is C, Java, where the lang is
inflexible, low level, or requires big structure that's hard to
change.

if you want software engineering books, i suggest try some books that
are based on statistical survey, as opposed to some dignitary's
=E2=80=9Copinion=E2=80=9D or current fashion & trends that comes with a jar=
gon. These
type of books are a dime a dozen, every year, they come and go. The
stastical survey approach takes major understaking and cost. The
opinion type any motherfucking =E2=80=9Cguru=E2=80=9D can write. e.g. Paul =
Graham has
you buy into certain concept of =E2=80=9Chackers=E2=80=9D fucker and claim =
they are
like =E2=80=9Cpainters=E2=80=9D. Certain Gabriel wants you to believe in po=
etry and C
is the last language. (see Book Review: Patterns of
Softwarehttp://xahlee.org/PageTwo_dir/Personal_dir/bookReviewRichardGabriel=
 .html
) et al. Certain Gosling wants you to believe Java is the last lang on
earth that'll wipe out Microsoft (circa 1998).

Pascal Constanza wrote:
> Yes. There are actually complete software development methodologies
> built around these ideas. Google for "extreme programming" and "agile
> software methodologies".

Pascal Constanza is a Common Lisp fanatic. Note here, that eXtreme
Programing is one of the snake oil, that ran like rampant wild fire in
the industry around 2002, with many books published on it on the
supposed motherfucking hip Software Engineering practices, but today
you don't hear much of it. I haven't looked at =E2=80=9CAgile programing=E2=
=80=9D
agile my ass, but it is probably a waste of time.

 ... what society overwhelmingly asks for is snake oil. Of course, the
snake oil has the most impressive names =E2=80=94otherwise you would be
selling nothing=E2=80=94 like =E2=80=9CStructured Analysis and Design=E2=80=
=9D, =E2=80=9CSoftware
Engineering=E2=80=9D, =E2=80=9CMaturity Models=E2=80=9D, =E2=80=9CManagemen=
t Information Systems=E2=80=9D,
=E2=80=9CIntegrated Project Support Environments=E2=80=9D =E2=80=9CObject O=
rientation=E2=80=9D and
=E2=80=9CBusiness Process Re-engineering=E2=80=9D (the latter three being k=
nown as
IPSE, OO and BPR, respectively).=E2=80=9D =E2=80=94 Edsger W Dijkstra (1930=
-2002), in
EWD 1175: The strengths of the academic enterprise.

you want to be a good programer? Study math, the math of programing,
and master the langs and protocols and tools you use. You want to
climb the tech industry ladder? get better at people, learn politics.
You want to be rich? Study business. Chances are, you are a coding
geek, and at heart you dna is not geared to be interested in politics
or business, and you'll never be rich or big ceo just because of that.

See also:
=E2=80=A2 Why Software Suck
 http://xahlee.org/UnixResource_dir/writ/why_software_suck.html

  Xah
=E2=88=91 http://xahlee.org/

=E2=98=84



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

Date: Thu, 05 Feb 2009 10:02:39 GMT
From: Bruce Cook <bruce-usenet@noreplybicycle.synonet.comnoreply>
Subject: Re: Regular Expression Help?
Message-Id: <498ab93c$1@news.mel.dft.com.au>

Trespasser wrote:

> Hi,
> 
> I can appreciate what a wonderfully powerful tool regular expressions are,
> but I am still learning and seem to need a little help.
> 
> I have an example of a regular expression for an Apache server mod_rewrite
> module rewrite trigger condition.
> 
> ^www.\.[^.]+\.domain\.com$

[...]

I'm not sure if you've found this already, but you can turn on logging for 
mod_rewrite in apache.  I have found it quite useful in the past.

Bruce




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

Date: Thu, 5 Feb 2009 09:36:11 -0800 (PST)
From: cartercc <cartercc@gmail.com>
Subject: unable to delete a file
Message-Id: <c66ea6af-2c15-406d-833f-a23a5af03a6e@m12g2000vbp.googlegroups.com>

The script downloads a file named EAUSR.txt from a remote server. The
contents of the file are new each day, that is, I always have to
download a new EAUSR.txt in order to process the new data. After I
process the data, I need to delete EAUSR.txt to prepare for the next
day's download.

Here is the code I use:

1 $file = get_daily_file();    # gets EAUSR.txt
2 open INFILE, "<", $file or die "Cannot open INFILE, $!";
3 process_daily_file();      # calls a number of different subs
4 close INFILE;
5 unlink $file;                  # does not delete EAUSR.txt
6 exit();

Here's the problem: After the script exits, EAUSR.txt stil exists. If
I move line 5 to the beginning of the script, it works fine --
EAUSR.txt is deleted before I get each day's new file. The funny thing
is that my script has run for years deleting the file at the end, as
shown above, but a couple of days ago, I made some extensive revisions
to the script and now it doesn't work.

It's not a permissions problem. It's not because INFILE is still open
(I don't think). It's not because unlink doesn't work. I don't have
any idea why unlink doesn't work at the end, but works at the
beginning. Any ideas?

Question: is there any version of close that closes all open
filehandles? The script as a whole is about 500 lines long, and in
running opens and closes dozens of files, and I'm thinking that maybe
the reason the file isn't deleted is because I have inadvertently not
closed it, although I have paired up all calls to open with a call to
close.

TIA, CC.


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

Date: Thu, 5 Feb 2009 11:48:37 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: unable to delete a file
Message-Id: <slrngom9jl.2rj.tadmc@tadmc30.sbcglobal.net>

cartercc <cartercc@gmail.com> wrote:

> 5 unlink $file;                  # does not delete EAUSR.txt


Ask it why it failed by checking the return value and including $!

   unlink $file or die "could not delete '$file' $!";


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Thu, 05 Feb 2009 18:59:03 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: unable to delete a file
Message-Id: <6v0nnaFhb2rvU1@mid.individual.net>

cartercc wrote:
> 
> 1 $file = get_daily_file();    # gets EAUSR.txt
> 2 open INFILE, "<", $file or die "Cannot open INFILE, $!";
> 3 process_daily_file();      # calls a number of different subs
> 4 close INFILE;
> 5 unlink $file;                  # does not delete EAUSR.txt
> 6 exit();
> 
> Here's the problem: After the script exits, EAUSR.txt stil exists.

 ...

> ... a couple of days ago, I made some extensive revisions
> to the script and now it doesn't work.
> 
> It's not a permissions problem. It's not because INFILE is still open
> (I don't think).

How about letting Perl help you check the latter?

     close INFILE or die $!;

> It's not because unlink doesn't work.

How about ensuring that that's the case?

     unlink $file or die $!;

> Question: is there any version of close that closes all open
> filehandles? The script as a whole is about 500 lines long, and in
> running opens and closes dozens of files, and I'm thinking that maybe
> the reason the file isn't deleted is because I have inadvertently not
> closed it,

If that's the case, the error message resulting from the failed 
unlink()ing ought to tell you.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Thu, 05 Feb 2009 09:59:24 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: unable to delete a file
Message-Id: <0OFil.24114$Ls4.13143@newsfe25.iad>

cartercc wrote:

> 5 unlink $file;                  # does not delete EAUSR.txt

It could be anything from the mount options on the drive, to file
attribute settings, to anything else.  Check the return value and the
error if it fails, like you would on an open call unlink $file or die
"can't unlike $file $!";


-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


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

Date: Thu, 05 Feb 2009 19:00:28 +0100
From: Christian Winter <thepoet_nospam@arcor.de>
Subject: Re: unable to delete a file
Message-Id: <498b2934$0$31334$9b4e6d93@newsspool4.arcor-online.net>

cartercc schrieb:
> The script downloads a file named EAUSR.txt from a remote server. The
> contents of the file are new each day, that is, I always have to
> download a new EAUSR.txt in order to process the new data. After I
> process the data, I need to delete EAUSR.txt to prepare for the next
> day's download.
> 
> Here is the code I use:
> 
> 1 $file = get_daily_file();    # gets EAUSR.txt
> 2 open INFILE, "<", $file or die "Cannot open INFILE, $!";
> 3 process_daily_file();      # calls a number of different subs
> 4 close INFILE;
> 5 unlink $file;                  # does not delete EAUSR.txt
> 6 exit();
> 
> Here's the problem: After the script exits, EAUSR.txt stil exists. If
> I move line 5 to the beginning of the script, it works fine --
> EAUSR.txt is deleted before I get each day's new file. The funny thing
> is that my script has run for years deleting the file at the end, as
> shown above, but a couple of days ago, I made some extensive revisions
> to the script and now it doesn't work.
> 
> It's not a permissions problem. It's not because INFILE is still open
> (I don't think). It's not because unlink doesn't work. I don't have
> any idea why unlink doesn't work at the end, but works at the
> beginning. Any ideas?

Could it be that process_daily_file also uses a $file variable,
overwriting its value? Did you check if $file still holds the
correct value?

You should check the return value of unlink in your script
(the number of files unlinked) and, if zero, output the
value of the error variable:

unlink $file
   or die "Unable to unlink file $file: $!";

The same goes for close, it also returns a true value on success
and a false one on failure, so:

close INFILE
   or die "Unable to close INFILE: $/";

-Chris


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

Date: Thu, 5 Feb 2009 10:07:22 -0800 (PST)
From: cartercc <cartercc@gmail.com>
Subject: Re: unable to delete a file
Message-Id: <fd2b92ee-f979-4c56-a596-8390bc061b73@v18g2000pro.googlegroups.com>

On Feb 5, 12:48=A0pm, Tad J McClellan <ta...@seesig.invalid> wrote:
> cartercc <carte...@gmail.com> wrote:
> > 5 unlink $file; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0# does not delete EA=
USR.txt
>
> Ask it why it failed by checking the return value and including $!
>
> =A0 =A0unlink $file or die "could not delete '$file' $!";
>
> --
> Tad McClellan
> email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"

Funny. I just tried this, and unlink deleted the EAUSR file just like
it was supposed to. Did not get any error message at all.

Must be the McClellan hex -- die or else!

CC


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

Date: Thu, 05 Feb 2009 09:22:46 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: what is the best way to convert a formatted time to a unix epoch
Message-Id: <6uvluoFhhqffU1@mid.individual.net>

Jürgen Exner wrote:
> Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
>> Hey guys (Jürgen, Tad, Sinan), give it a break, please.
>>
>> I had already answered the question, as well as questioned the seemingly 
>> contradictory millisecond requirement, and the OP had explained the latter.
>>
>> This whole sub-thread appears to be totally unnecessary, and only serves 
>> the purpose of adding to the high noise level of this group.
> 
> Fair enough. But I do take objection to the implication of "already" in
> your first sentence. According to the time stamps you are right. But at
> the time I wrote and sent my answer your reply had not arrived at my
> client yet and therefore was not visible to me.
> That's why I wrote my reply in the first place: there was no other reply
> yet.

Yeah, I know that questions get answered multiple times for that reason, 
and the OP is certainly not guiltless of the mess. It's still a mess IMO. :(

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Thu, 05 Feb 2009 07:41:47 -0600
From: Chris Mattern <syscjm@sumire.gwu.edu>
Subject: Re: what is the best way to convert a formatted time to a unix epoch
Message-Id: <slrngolr4r.544.syscjm@sumire.gwu.edu>

On 2009-02-05, rabbits77 <rabbits77@my-deja.com> wrote:
> x-no-archive: yes
>
>> Why did you (attempt to) ask for no archiving of your post?
>
> No, this will actually work. With Google anyway. Since many users are
> simply not allowed by their clients to modify headers Google will honor
> the x-no-archive if it is the first line of a post.
> Speaking of Google, maybe you should use it before typing.
>
>> If it is archived, then others seeking an answer to the same
>> question would be able to find it.
>
> How uncharacteristically altruistic of you. Typically your posts are
> socially retarded rants on grammar and semantics.
> Are you back on your meds?

Enough gratuitous insults.  The intimation that other posters should use
Google while you make sure your posts won't show up on Google was
particularly cute.  *plonk*


-- 
             Christopher Mattern

NOTICE
Thank you for noticing this new notice
Your noticing it has been noted
And will be reported to the authorities


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

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 V11 Issue 2184
***************************************


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