[30266] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1509 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun May 4 21:09:48 2008

Date: Sun, 4 May 2008 18:09:10 -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           Sun, 4 May 2008     Volume: 11 Number: 1509

Today's topics:
    Re: FAQ 3.23 Can I write useful Perl programs on the co <brian.d.foy@gmail.com>
    Re: FAQ 4.17 How do I find yesterday's date? <szrRE@szromanMO.comVE>
    Re: FAQ 4.17 How do I find yesterday's date? <hjp-usenet2@hjp.at>
    Re: FAQ 4.17 How do I find yesterday's date? <brian.d.foy@gmail.com>
    Re: How to print formatted (!) the current timestamp? <kkeller-usenet@wombat.san-francisco.ca.us>
    Re: How to print formatted (!) the current timestamp? <noreply@gunnar.cc>
    Re: How to print formatted (!) the current timestamp? <ben@morrow.me.uk>
    Re: How to print formatted (!) the current timestamp? <uri@stemsystems.com>
    Re: How to print formatted (!) the current timestamp? <kkeller-usenet@wombat.san-francisco.ca.us>
    Re: How to print formatted (!) the current timestamp? <noreply@gunnar.cc>
    Re: master perl calling slave perl <usenet@larseighner.com>
    Re: master perl calling slave perl <jimsgibson@gmail.com>
    Re: master perl calling slave perl <joost@zeekat.nl>
    Re: master perl calling slave perl <jurgenex@hotmail.com>
    Re: master perl calling slave perl <hjp-usenet2@hjp.at>
    Re: master perl calling slave perl <uri@stemsystems.com>
    Re: Perl 6 <brian.d.foy@gmail.com>
        Problem with email attachment, 1 becomes 10 <mikaelb@df.lth.se>
    Re: Will Perl 6 be usable as a procedure language? <abigail@abigail.be>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 04 May 2008 22:41:21 +0200
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: FAQ 3.23 Can I write useful Perl programs on the command line?
Message-Id: <040520082241218886%brian.d.foy@gmail.com>

In article
<43a75974-ec4c-41d3-8912-4a8b873190e3@u12g2000prd.googlegroups.com>,
Ben Bullock <benkasminbullock@gmail.com> wrote:

> On May 4, 1:59 pm, Sherman Pendley <spamt...@dot-app.org> wrote:
> > Ben Bullock <benkasminbull...@gmail.com> writes:
> > > On Sat, 03 May 2008 12:03:02 -0700, PerlFAQ Server wrote:
> >
> > >> 3.23: Can I write useful Perl programs on the command line?
> >
> > > Has anybody ever, even once, asked this question, or even something
> > > similar to it? I just can't imagine anybody asking that kind of question.
> >
> > That's the ever-lasting mystery of FAQs - if they do their job, the Qs are
> > no longer so F any more. :-)
> 
> I'm pretty sure that Q has never been F let alone A.

I don't know. Several people have asked me about it in Perl classes I
teach. They are usually sysadmins trying to make things that were shell
or awk or sed into Perl.

It's certainly not a representative sample, but the FAQ will stay in
perlfaq. It's not hurting anyone there. :)


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

Date: Sun, 4 May 2008 09:15:52 -0700
From: "szr" <szrRE@szromanMO.comVE>
Subject: Re: FAQ 4.17 How do I find yesterday's date?
Message-Id: <fvknfp026so@news4.newsguy.com>

PerlFAQ Server wrote:
> This is an excerpt from the latest version perlfaq4.pod, which
> comes with the standard Perl distribution. These postings aim to
> reduce the number of repeated questions as well as allow the community
> to review and update the answers. The latest version of the complete
> perlfaq is at http://faq.perl.org .
>
> --------------------------------------------------------------------
>
> 4.17: How do I find yesterday's date?
>
>    (contributed by brian d foy)
>
>    Use one of the Date modules. The "DateTime" module makes it
>    simple, and give you the same time of day, only the day before.
>
>            use DateTime;
>
>            my $yesterday = DateTime->now->subtract( days => 1 );
>
>            print "Yesterday was $yesterday\n";
>
>    You can also use the "Date::Calc" module using its "Today_and_Now"
>    function.
>
>            use Date::Calc qw( Today_and_Now Add_Delta_DHMS );
>
>            my @date_time = Add_Delta_DHMS( Today_and_Now(), -1, 0, 0,
> 0 );
>
>            print "@date_time\n";
>
>    Most people try to use the time rather than the calendar to figure
>    out dates, but that assumes that days are twenty-four hours each.
>    For most people, there are two days a year when they aren't: the
>    switch to and from summer time throws this off. Let the modules do
> the work.

So according to the last part, that makes
   time - 86400
unreliable?

E.G.,
   $ perl -e 'print scalar localtime(time - 86400), "\n";'

Or is it safe to use that?

-- 
szr 




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

Date: Sun, 4 May 2008 20:24:29 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: FAQ 4.17 How do I find yesterday's date?
Message-Id: <slrng1rvqt.bu1.hjp-usenet2@hrunkner.hjp.at>

On 2008-05-04 16:15, szr <szrRE@szromanMO.comVE> wrote:
> PerlFAQ Server wrote:
>> 4.17: How do I find yesterday's date?
[...]
>>    Most people try to use the time rather than the calendar to figure
>>    out dates, but that assumes that days are twenty-four hours each.
>>    For most people, there are two days a year when they aren't: the
>>    switch to and from summer time throws this off. Let the modules do
>> the work.
>
> So according to the last part, that makes
>    time - 86400
> unreliable?

Yes.

> E.G.,
>    $ perl -e 'print scalar localtime(time - 86400), "\n";'

Consider:

% perl -le 'print scalar localtime(1206914460)'
Mon Mar 31 00:01:00 2008
% perl -le 'print scalar localtime(1206914460-86400)'
Sat Mar 29 23:01:00 2008

% perl -le 'print scalar localtime(1225061940)'
Sun Oct 26 23:59:00 2008
% perl -le 'print scalar localtime(1225061940-86400)'
Sun Oct 26 00:59:00 2008


> Or is it safe to use that?

Only after 01:00 and before 23:00.

	hp


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

Date: Sun, 04 May 2008 22:39:16 +0200
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: FAQ 4.17 How do I find yesterday's date?
Message-Id: <040520082239161427%brian.d.foy@gmail.com>

In article <fvknfp026so@news4.newsguy.com>, szr <szrRE@szromanMO.comVE>
wrote:


> >    Most people try to use the time rather than the calendar to figure
> >    out dates, but that assumes that days are twenty-four hours each.
> >    For most people, there are two days a year when they aren't: the
> >    switch to and from summer time throws this off. Let the modules do
> > the work.
> 
> So according to the last part, that makes
>    time - 86400
> unreliable?
> 
> E.G.,
>    $ perl -e 'print scalar localtime(time - 86400), "\n";'
> 
> Or is it safe to use that?

Well, that last paragraph explains why that won't work. There are two
days where it breaks. On one you'll get the date from two days ago, and
the other the same day. So, no, it's not safe.


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

Date: Sun, 4 May 2008 11:06:10 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: How to print formatted (!) the current timestamp?
Message-Id: <jha1f5xot6.ln2@goaway.wombat.san-francisco.ca.us>

On 2008-05-04, Thomas Blabb <t.blabb@gmail.com> wrote:
> I want to print the current time(stamp) in formatted style.
> The following does not work:
>
> print STDOUT "Now=%Y%m%d-%H%M\n", localtime(time);

Did you read perldoc -f localtime?

If you are happy with localtime's formatting, simply print it as a
scalar:

print scalar localtime();

If you want to use a print-equivalent statement to do your formatting,
you need to use printf.  Also, perl date formatting has nothing to do
with UNIX date; %Y for example is the hash named Y, and bears no
relation at all to your call to localtime.  Read perldoc -f sprintf for
valid formats (%Y is certainly not one).

--keith

-- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information



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

Date: Sun, 04 May 2008 20:22:35 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: How to print formatted (!) the current timestamp?
Message-Id: <686d7hF2rllsjU1@mid.individual.net>

Keith Keller wrote:
> perl date formatting has nothing to do with UNIX date; %Y for example 
> is the hash named Y, and bears no relation at all to your call to 
> localtime.  Read perldoc -f sprintf for valid formats (%Y is 
> certainly not one).

Wouldn't it have been better to point the OP to POSIX::strftime() and 
drop that rant?

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


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

Date: Sun, 4 May 2008 19:29:02 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: How to print formatted (!) the current timestamp?
Message-Id: <esb1f5-ht3.ln1@osiris.mauzo.dyndns.org>


Quoth Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>:
> On 2008-05-04, Thomas Blabb <t.blabb@gmail.com> wrote:
> > I want to print the current time(stamp) in formatted style.
> > The following does not work:
> >
> > print STDOUT "Now=%Y%m%d-%H%M\n", localtime(time);
> 
<snip>
> If you want to use a print-equivalent statement to do your formatting,
> you need to use printf.  Also, perl date formatting has nothing to do
> with UNIX date; %Y for example is the hash named Y, and bears no
> relation at all to your call to localtime.  Read perldoc -f sprintf for
> valid formats (%Y is certainly not one).

 ...however it is a valid format for strftime, which I suspect is what
the OP wanted.

    use POSIX qw/strftime/;

    print STDOUT strftime "Now=%Y%m%d-%H%M\n", localtime;

Ben

-- 
I have two words that are going to make all your troubles go away.
"Miniature". "Golf".
                                                         [ben@morrow.me.uk]


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

Date: Sun, 04 May 2008 18:38:52 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: How to print formatted (!) the current timestamp?
Message-Id: <x7skwx29tw.fsf@mail.sysarch.com>

>>>>> "KK" == Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> writes:

  KK> On 2008-05-04, Thomas Blabb <t.blabb@gmail.com> wrote:

  >> print STDOUT "Now=%Y%m%d-%H%M\n", localtime(time);

  KK> If you want to use a print-equivalent statement to do your formatting,
  KK> you need to use printf.  Also, perl date formatting has nothing to do
  KK> with UNIX date; %Y for example is the hash named Y, and bears no
  KK> relation at all to your call to localtime.  Read perldoc -f sprintf for
  KK> valid formats (%Y is certainly not one).

actually %Y is just the string '%Y' there. hashes don't interpolate in
strings. and yes, the OP is confusing time formats (date and strftime)
with printf formats.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


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

Date: Sun, 4 May 2008 13:54:35 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: How to print formatted (!) the current timestamp?
Message-Id: <cdk1f5x9c8.ln2@goaway.wombat.san-francisco.ca.us>

On 2008-05-04, Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
> Keith Keller wrote:
>> perl date formatting has nothing to do with UNIX date; %Y for example 
>> is the hash named Y, and bears no relation at all to your call to 
>> localtime.  Read perldoc -f sprintf for valid formats (%Y is 
>> certainly not one).
>
> Wouldn't it have been better to point the OP to POSIX::strftime() and 
> drop that rant?

Was I ranting?  I thought I was just being complete.  Thanks for the
pointer to POSIX::strftime; I seldom use the POSIX:: modules.

--keith

-- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information



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

Date: Mon, 05 May 2008 00:00:58 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: How to print formatted (!) the current timestamp?
Message-Id: <686q11F2qbrgeU1@mid.individual.net>

Keith Keller wrote:
> On 2008-05-04, Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
>> Keith Keller wrote:
>>> perl date formatting has nothing to do with UNIX date; %Y for example 
>>> is the hash named Y, and bears no relation at all to your call to 
>>> localtime.  Read perldoc -f sprintf for valid formats (%Y is 
>>> certainly not one).
>>
>> Wouldn't it have been better to point the OP to POSIX::strftime() and 
>> drop that rant?
> 
> Was I ranting?  I thought I was just being complete.  Thanks for the
> pointer to POSIX::strftime; I seldom use the POSIX:: modules.

The attempt to use the string '%Y%m%d-%H%M' in a date formating context 
told us that the OP was groping for strftime(). Considering that Owen 
had figured it out several hours before you posted, I found it not very 
fruitful to lead the OP away from that date formating method.

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


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

Date: Sun, 04 May 2008 10:14:44 -0500
From: Lars Eighner <usenet@larseighner.com>
Subject: Re: master perl calling slave perl
Message-Id: <slrng1rkir.hjn.usenet@debranded.larseighner.com>

In our last episode, <fvkj8m$1pt$1@ijustice.itsc.cuhk.edu.hk>, the lovely
and talented Ela broadcast on comp.lang.perl.misc:


> "Jo" <jo@nosp.invalid> wrote in message 
> news:481d8b97$0$14343$e4fe514c@news.xs4all.nl...
>> Ela said:
>>> When running the slave prog directly by perl slave.pl, something is
>>> printed onto screen but
>>> perl master.pl (master.pl call salve.pl by > system)
>>> does not
>>
>> On my system it does. Maybe you should post a simple example of master.pl
>> and slave.pl showing when it doesn't.
>>


> Oh sorry the perl is called by a master SHELL master.sh but not master 
> perl...

> #!/bin/sh
>   `perl slave.pl $dirname`

> So how to solve?

Don't use backticks.  See man sh.


-- 
Lars Eighner <http://larseighner.com/> usenet@larseighner.com
                         Countdown: 261 days to go.


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

Date: Sun, 04 May 2008 12:10:09 -0700
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: master perl calling slave perl
Message-Id: <040520081210093374%jimsgibson@gmail.com>

In article <fvkj8m$1pt$1@ijustice.itsc.cuhk.edu.hk>, Ela
<ela@yantai.org> wrote:

> "Jo" <jo@nosp.invalid> wrote in message 
> news:481d8b97$0$14343$e4fe514c@news.xs4all.nl...
> > Ela said:
> >> When running the slave prog directly by perl slave.pl, something is
> >> printed onto screen but
> >> perl master.pl (master.pl call salve.pl by > system)
> >> does not
> >
> > On my system it does.
> > Maybe you should post a simple example of master.pl and slave.pl
> > showing when it doesn't.
> >
> 
> 
> Oh sorry the perl is called by a master SHELL master.sh but not master 
> perl...
> 
> #!/bin/sh
>   `perl slave.pl $dirname`
> 
> So how to solve?

Send the output stream from your Perl program to STDOUT:

#!/bin/sh
echo `perl slave.pl $dirname`

-- 
Jim Gibson

 Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------     
                http://www.usenet.com


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

Date: Sun, 04 May 2008 21:13:33 +0200
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: master perl calling slave perl
Message-Id: <87myn5g9wi.fsf@zeekat.nl>

Jim Gibson <jimsgibson@gmail.com> writes:

> Send the output stream from your Perl program to STDOUT:
>
> #!/bin/sh
> echo `perl slave.pl $dirname`

or, you know:

#!/bin/sh
perl slave.pl $dirname

-- 
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/


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

Date: Sun, 04 May 2008 19:38:24 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: master perl calling slave perl
Message-Id: <q04s14lie75vk0df1khlsf586l85fs4bm3@4ax.com>

"Ela" <ela@yantai.org> wrote:
>> Ela said:
>>> When running the slave prog directly by perl slave.pl, something is
>>> printed onto screen but
>>> perl master.pl (master.pl call salve.pl by > system)
>>> does not

>#!/bin/sh
>  `perl slave.pl $dirname`

Dude, you are _EXPLICITELY_ asking the shell to capture the output of
the subprocess and you wonder why it isn't printed?

> So how to solve?

Maybe don't ask the shell to caputure the output?

jue


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

Date: Sun, 4 May 2008 21:37:37 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: master perl calling slave perl
Message-Id: <slrng1s441.i2i.hjp-usenet2@hrunkner.hjp.at>

On 2008-05-04 19:10, Jim Gibson <jimsgibson@gmail.com> wrote:
> In article <fvkj8m$1pt$1@ijustice.itsc.cuhk.edu.hk>, Ela
><ela@yantai.org> wrote:
>> #!/bin/sh
>>   `perl slave.pl $dirname`
>> 
>> So how to solve?
>
> Send the output stream from your Perl program to STDOUT:
>
> #!/bin/sh
> echo `perl slave.pl $dirname`

Ouch!

	hp


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

Date: Sun, 04 May 2008 20:15:16 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: master perl calling slave perl
Message-Id: <x7hcdd25d7.fsf@mail.sysarch.com>

>>>>> "JG" == Jim Gibson <jimsgibson@gmail.com> writes:

  >> 
  >> #!/bin/sh
  >> `perl slave.pl $dirname`

  JG> Send the output stream from your Perl program to STDOUT:

  JG> #!/bin/sh
  JG> echo `perl slave.pl $dirname`

useless use of echo. just drop the backticks as others have mentioned.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


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

Date: Sun, 04 May 2008 22:47:23 +0200
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: Perl 6
Message-Id: <040520082247230609%brian.d.foy@gmail.com>

In article <fvi5ne020lt@news4.newsguy.com>, szr <szrRE@szromanMO.comVE>
wrote:

> While I agree we all need to be patient, one might reasonably think that 
> 8+ years is a rather long time to be working on one single piece of 
> software, no?

Maybe, but no one started writing code right away, so the Perl 6
implementations are younger than the idea of Perl 6.

I really consider the real work to have started around 2005. People
sorta wandered around for a bit after the coding got started and only
really hit on the right path and right group of people around that
time. No one really wants to talk about that though, and are content to
let people think it's just taking a long time rather than admit having
problems at first.


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

Date: Mon, 05 May 2008 03:07:53 +0200
From: "M.O.B. i L." <mikaelb@df.lth.se>
Subject: Problem with email attachment, 1 becomes 10
Message-Id: <fvlml7$heo$1@news.lth.se>

I'm trying to write a program that can send out mails to companies where
I'm interested in working. These mails are the same except that the
company name is switched. My CV should be attached as a pdf-file.
The problem is that I don't get one attachment, but ten! Also the
message is repeated 10 times. If I change the program by uncommenting
the commented line in the function load() it works but then it doesn't
send the correct pdf-file. The CV is 129490 bytes. How could I change
this program so that there is only one attachment and no repeated messages?

In the program below some long lines might have been splitted.

#!/usr/bin/perl

# jobapplier.pl vN/A (Buggy!)
# Author: Mikael O. Bonnier, mikaelb@df.lth.se, 
http://www.df.lth.se/~mikaelb/
# Copyright (C) 2008 by Mikael O. Bonnier, Lund, Sweden.
# License: GNU GPL v3 or later, http://www.gnu.org/licenses/gpl-3.0.txt

use strict;
use Email::Send;
use Email::Simple::Creator;
use Email::MIME::Modifier;
use DBI;
use MIME::Words qw/encode_mimewords/;
use File::stat;

my %settings = (
     SMTP        => 'mail.df.lth.se',
     PORT        => 588,
     FROM_DOMAIN => 'cust.bredbandsbolaget.se',
     DB          => 'jobapplier_test',
     DB_HOST     => 'localhost',
     FROM        => 'mikaelb@df.lth.se',
     SUBJECT     => 'Intresseanmälan som fysiker eller programutvecklare',
     BODY =>
         'Det skulle vara intressant att jobba hos er på $cCompany.',
     UPLDDIR => '../Documents/LyX',
     FILE    => 'MOB_CV.pdf',
);
@ARGV == 4
     or die
'Provide username and password for the SMTP and the MySQL server,
respectively,'
     . " on the command line.\n";
@settings{qw( USER PASS DB_USER DB_PASS)} = @ARGV;

my $dbh = DBI->connect( "DBI:mysql:$settings{DB}:$settings{DB_HOST}",
     $settings{DB_USER}, $settings{DB_PASS} );

my $q = q|select cCompany, cEmail
           from Contacts
           order by cId asc|;
my $sth = $dbh->prepare($q);
$sth->execute;
my $as = [];
while ( my $hr = $sth->fetchrow_hashref ) {
     push @{$as}, $hr;
}
$dbh->disconnect;

my $mailer = Email::Send->new(
     {
         mailer      => 'SMTP::TLS',
         mailer_args => [
             Host     => $settings{SMTP},
             Port     => $settings{PORT},
             User     => $settings{USER},
             Password => $settings{PASS},
             Hello    => $settings{FROM_DOMAIN},
         ]
     }
);

for my $row (@$as) {
     my $body_text = $settings{BODY};
     $body_text =~ s/\$cCompany/$row->{cCompany}/g;
     my $email = Email::Simple->create(
         header => [
             From           => $settings{FROM},
             To             => $row->{cEmail},
             Subject        => encode_mimewords( $settings{SUBJECT} ),
             'Content-Type' => 'text/plain; charset="utf-8"',
         ],
         body => $body_text,
     );
     my $body = load( $settings{UPLDDIR}, $settings{FILE} );
     my $part = Email::MIME->new('');
     $part->body_set($body);
     $part->disposition_set('attachment');
     $part->name_set( $settings{FILE} );        # Both needed?
     $part->filename_set( $settings{FILE} );    # Both needed?
     $part->encoding_set('base64');
     $part->content_type_set('application/octet-stream');
     my @more_parts = ($part);
     $email = Email::MIME->new( $email->as_string );
     $email->parts_add( \@more_parts );

     eval { $mailer->send($email) };
     die "Error sending email: $@" if $@;
}

sub load {
     my ( $upldDir, $inFile ) = @_;
     my $DNLDFILE;
     open $DNLDFILE, '<', "$upldDir/$inFile";
     binmode $DNLDFILE;
     my $st = stat $DNLDFILE;
     my $content;
     read $DNLDFILE, $content, $st->size;
     close $DNLDFILE;

     #     $content = 'ABC';
     return $content;
}

__END__


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

Date: 04 May 2008 17:12:45 GMT
From: Abigail <abigail@abigail.be>
Subject: Re: Will Perl 6 be usable as a procedure language?
Message-Id: <slrng1rrkd.ql6.abigail@alexandra.abigail.be>

                                     _
szr (szrRE@szromanMO.comVE) wrote on VCCCLVIII September MCMXCIII in
<URL:news:fvdpkf02a6n@news4.newsguy.com>:
::  
::  So given this, why would one, who have plenty of Perl code, feel 
::  compelled to choose Perl 6 over Perl 5 and spend what could huge amounts 
::  of time rewriting a lot of code?


The same kind of people that over the years left Perl5 behind and started
coding in Ruby, Dylan, Java or Python.

There will always be people not, or no longer, satisfied by the language
they are using. Many of those people switch language.



Abigail
-- 
package Z;use overload'""'=>sub{$b++?Hacker:Another};
sub TIESCALAR{bless\my$y=>Z}sub FETCH{$a++?Perl:Just}
$,=$";my$x=tie+my$y=>Z;print$y,$x,$y,$x,"\n";#Abigail


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

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 1509
***************************************


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