[29005] in Perl-Users-Digest
Perl-Users Digest, Issue: 249 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 21 21:10:18 2007
Date: Wed, 21 Mar 2007 18:09:13 -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 Wed, 21 Mar 2007 Volume: 11 Number: 249
Today's topics:
Re: "Casting" a split into an array <wahab-mail@gmx.de>
Re: Any good Perl coders out there? <jokinentimo@kolumbus.fi.invalid>
Re: Any good Perl coders out there? (Jamie)
Re: Any good Perl coders out there? <kkeller-usenet@wombat.san-francisco.ca.us>
Re: FAQ 8.4 How do I print something out in color? joepeck02@gmail.com
Re: how to get next day <mothra@nowhereatall.com>
Re: How to print on the special table cell column? <greg.ferguson@icrossing.com>
Re: How to print on the special table cell column? <greg.ferguson@icrossing.com>
Re: I dotn understand this error <hackeras@gmail.com>
Re: I dotn understand this error <jgibson@mail.arc.nasa.gov>
Re: perl feature request <spamtrap@dot-app.org>
Re: perl feature request anno4000@radom.zrz.tu-berlin.de
Re: perl feature request <uri@stemsystems.com>
Re: perl feature request <ben@morrow.me.uk>
Re: perl feature request <uri@stemsystems.com>
Re: perl feature request anno4000@radom.zrz.tu-berlin.de
Re: perl feature request anno4000@radom.zrz.tu-berlin.de
Re: perl feature request <DJStunks@gmail.com>
Re: perl feature request <bik.mido@tiscalinet.it>
Re: Perl/CGI file upload <noreply@gunnar.cc>
Re: regex question <rvtol+news@isolution.nl>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 21 Mar 2007 21:54:48 +0100
From: Mirco Wahab <wahab-mail@gmx.de>
Subject: Re: "Casting" a split into an array
Message-Id: <ets6dr$d61$1@mlucom4.urz.uni-halle.de>
Fabrice Baro wrote:
> [more... context ;P John] In fact, I'm downsizing alignments of genes
> for simulation purposes. So the order of the letters doesn't matter as
> much as to pick the same positions for each sequence.
> On my previous example, I showed the indexes only for clarity
> purposes. But in my particular case, I think I don't have another
> option than to build an actual array of indexes to be able to apply
> the same to more than an array.
Can you give one example of what you *really*
want to do? With some exact input data and some
output which you would expect from it?
Regards
Mirco
------------------------------
Date: Wed, 21 Mar 2007 23:50:09 +0200
From: Timo Jokinen <jokinentimo@kolumbus.fi.invalid>
Subject: Re: Any good Perl coders out there?
Message-Id: <GMhMh.21970$Uk6.15371@reader1.news.saunalahti.fi>
Michael Vilain wrote:
> In article <1174493670.753360.57970@n76g2000hsh.googlegroups.com>,
> "amerar@iwc.net" <amerar@iwc.net> wrote:
>
>> Hi All,
>>
>> I need to convert a PHP script into Perl. This PHP script interacts
>> with our Oracle database. It executes some stored procedures and
>> returns values. I've pasted the PHP code below, I'm just not sure how
>> to code it in Perl & DBI. Can anyone help?? I would really
>> appreciate it.
>>
>> PHP CODE
>> ----------------
>> $conn = ociplogon("scott", "tiger", "ABCD.world");
>> $curs = OCINewCursor($conn);
>> $stmt = OCIParse($conn,"BEGIN AUTO_CHARGE.EXP_RENEW_SUBSCR(:data);
>> end ;");
>> ocibindbyname($stmt,"data",&$curs,-1,OCI_B_CURSOR);
>> ociexecute($stmt);
>> ociexecute($curs);
>>
>> while (OCIFetchInto($curs,&$data)) {
>> $customer_id = $data[0];
>> $owner_name = $data[1];
>> $type = $data[2];
>> $code = $data[3];
>> .
>> .
>> .
>> }
>
> Gee, your boss should know you're in over your head and completely
> incompetent. Where do you work?
>
Sorry but if you doesn't want to help him/her don't bother to
write your sarcastic's answer's.
cheers
-timppa
------------------------------
Date: Wed, 21 Mar 2007 22:07:57 GMT
From: nospam@geniegate.com (Jamie)
Subject: Re: Any good Perl coders out there?
Message-Id: <Lc117449434296880x8c0e7c4@pong.podro.com>
In <GMhMh.21970$Uk6.15371@reader1.news.saunalahti.fi>,
Timo Jokinen <jokinentimo@kolumbus.fi.invalid> mentions:
>Michael Vilain wrote:
>> In article <1174493670.753360.57970@n76g2000hsh.googlegroups.com>,
>> "amerar@iwc.net" <amerar@iwc.net> wrote:
>>
>>> Hi All,
>>>
>>> I need to convert a PHP script into Perl. This PHP script interacts
>>> with our Oracle database. It executes some stored procedures and
>>> returns values. I've pasted the PHP code below, I'm just not sure how
>>> to code it in Perl & DBI. Can anyone help?? I would really
>>> appreciate it.
>>>
>>> PHP CODE
>>> ----------------
>>> $conn = ociplogon("scott", "tiger", "ABCD.world");
>>> $curs = OCINewCursor($conn);
>>> $stmt = OCIParse($conn,"BEGIN AUTO_CHARGE.EXP_RENEW_SUBSCR(:data);
>>> end ;");
>>> ocibindbyname($stmt,"data",&$curs,-1,OCI_B_CURSOR);
>>> ociexecute($stmt);
>>> ociexecute($curs);
>>>
>>> while (OCIFetchInto($curs,&$data)) {
>>> $customer_id = $data[0];
>>> $owner_name = $data[1];
>>> $type = $data[2];
>>> $code = $data[3];
>>> .
>>> .
>>> .
>>> }
>Sorry but if you doesn't want to help him/her don't bother to
>write your sarcastic's answer's.
Well said!
This is part of the reason perl is loosing ground to other languages like PHP.
Here we have a perfectly good opportunity to introduce someone to the wonders
of perl and we've thrown it away. The original poster will probably walk away
from all this thinking
"Perl? phew! no thanks!"
As far as offering a helpful answer, (to the original post) what you'll want to
do is check out the DBI and DBD modules at your friendly neighborhood CPAN
archive.
DBI is the modern way perl programs communicate with databases, DBI is a
generic interface. DBD is the actual database driver for it. (there is
one DBI and separate DBD's for each particular database.)
You'll find that with with the standard interface of DBI, porting your
application to other databases is a bit easier.
Do a 'perldoc DBI' for the details, it's quite easy once you get around to
understanding statement handles and connection handles. (these are a bit like
Resource handles of PHP)
You'll also want to glance over the DBD driver for oracle to find the connection
string details.
Jamie
--
http://www.geniegate.com Custom web programming
Perl * Java * UNIX User Management Solutions
------------------------------
Date: Wed, 21 Mar 2007 15:24:07 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: Any good Perl coders out there?
Message-Id: <8tn8d4xkm6.ln2@goaway.wombat.san-francisco.ca.us>
On 2007-03-21, Jamie <nospam@geniegate.com> wrote:
> In <GMhMh.21970$Uk6.15371@reader1.news.saunalahti.fi>,
> Timo Jokinen <jokinentimo@kolumbus.fi.invalid> mentions:
>
>>Sorry but if you doesn't want to help him/her don't bother to
>>write your sarcastic's answer's.
>
> Well said!
>
> This is part of the reason perl is loosing ground to other languages like PHP.
I'm sure you have data to support this claim!
(not advocating answering questions sarcastically, I just doubt your
claim)
--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: 21 Mar 2007 15:18:16 -0700
From: joepeck02@gmail.com
Subject: Re: FAQ 8.4 How do I print something out in color?
Message-Id: <1174515496.624871.129140@n59g2000hsh.googlegroups.com>
My original response by email to URI's comment:
> Well you have me figured out. I have been browsing
> comp.lang.perl.misc only since yesterday. As for the perl docs I
> have have very limited experience with them since my previous
> linux installation did not carry them (gasp) and I only recently
> committed myself to giving perl a serious chance.
> I am certainly going to check out the perl faqs tonight, thanks
> for the tips and the email.
I did check out the faq's last night and spent about an hour reading
it. Really really nice stuff, and I think its great that you are
posting the tips here. When I think of faqs I normally think of
really simple questions. I probably would have never gone to the site
if it wasn't for your posts here. So certainly keep at it and thanks
to you both. =)
Joe P
------------------------------
Date: Wed, 21 Mar 2007 14:00:36 -0700
From: "Mothra" <mothra@nowhereatall.com>
Subject: Re: how to get next day
Message-Id: <4601a648$1@usenet.ugs.com>
"Bob" <not_valid2@yahoo.com> wrote in message
news:46004b84$0$276$8046368a@newsreader.iphouse.net...
> Thanks for your info... perhaps you would help me with --
>
> the following shows using today or NOW ....
> what is the correct syntax for a different date -
> like 1-Mar-2007.
>
> use DateTime;
> my $yesterday = DateTime->now->subtract( days => 1 );
> print "Yesterday was $yesterday\n";
>
use strict;
use warnings;
use DateTime;
my $date = DateTime->new( year => 2007,
month => 3,
day => 1
);
print $date->subtract(days =>1);
Hope this helps
Mothra
------------------------------
Date: 21 Mar 2007 16:22:05 -0700
From: "gf" <greg.ferguson@icrossing.com>
Subject: Re: How to print on the special table cell column?
Message-Id: <1174519325.521816.174680@b75g2000hsg.googlegroups.com>
On Mar 20, 8:33 pm, "robertchen...@gmail.com"
<robertchen...@gmail.com> wrote:
> my $cgi = new CGI;
> print $cgi->start_table({-border=>0});
> print "<tr align=\"left\">";
> print $cgi->th('Sunday');
> print $cgi->th('Monday');
> print $cgi->th('Tuesday');
> print $cgi->th('Wensday');
> print $cgi->th('Thursday');
> print $cgi->th('Friday');
> print $cgi->th('Saturday');
>
> Now I have a date, say "0320/2007", How could I print on the
> "'Tuesday" column cell?
>
> $cgi->td could do this? If not, how could I do?
Just as in all things Perl, there are many ways to do it.
This is one...
my $q = new CGI;
print $q->table(
$q->Tr(
[
$q->th( [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday' ] ),
$q->td( [ ' ', ' ', '03/20/2007', ' ',
' ', ' ', ' ' ] )
]
)
),
"\n";
The bigger problem is how do you fit that into your code and data
flow?
------------------------------
Date: 21 Mar 2007 16:22:17 -0700
From: "gf" <greg.ferguson@icrossing.com>
Subject: Re: How to print on the special table cell column?
Message-Id: <1174519337.247862.269950@n76g2000hsh.googlegroups.com>
On Mar 20, 8:33 pm, "robertchen...@gmail.com"
<robertchen...@gmail.com> wrote:
> my $cgi = new CGI;
> print $cgi->start_table({-border=>0});
> print "<tr align=\"left\">";
> print $cgi->th('Sunday');
> print $cgi->th('Monday');
> print $cgi->th('Tuesday');
> print $cgi->th('Wensday');
> print $cgi->th('Thursday');
> print $cgi->th('Friday');
> print $cgi->th('Saturday');
>
> Now I have a date, say "0320/2007", How could I print on the
> "'Tuesday" column cell?
>
> $cgi->td could do this? If not, how could I do?
Just as in all things Perl, there are many ways to do it.
This is one...
my $q = new CGI;
print $q->table(
$q->Tr(
[
$q->th( [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday' ] ),
$q->td( [ ' ', ' ', '03/20/2007', ' ',
' ', ' ', ' ' ] )
]
)
),
"\n";
The bigger problem is how do you fit that into your code and data
flow?
------------------------------
Date: 21 Mar 2007 15:08:54 -0700
From: "=?utf-8?B?zp3Or866zr/Pgg==?=" <hackeras@gmail.com>
Subject: Re: I dotn understand this error
Message-Id: <1174514934.398873.118650@y66g2000hsf.googlegroups.com>
On Mar 21, 2:44=C2=A0pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
> >here is the whole code if you can see the error that would be good, i
>
> Where is it?
Well when i try to copy/paste i get an error message that i cannot
copy/paste binary files.
Iam using googles groups to talk here... how am i supposed to paste
the code now?!
------------------------------
Date: Wed, 21 Mar 2007 16:32:55 -0700
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: I dotn understand this error
Message-Id: <210320071632551671%jgibson@mail.arc.nasa.gov>
In article <1174514934.398873.118650@y66g2000hsf.googlegroups.com>,
????? <hackeras@gmail.com> wrote:
> On Mar 21, 2:44 pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
>
> > >here is the whole code if you can see the error that would be good, i
> >
> > Where is it?
>
> Well when i try to copy/paste i get an error message that i cannot
> copy/paste binary files.
> Iam using googles groups to talk here... how am i supposed to paste
> the code now?!
Code is normally text. Does your code contain any special or binary
characters, such as UTF? If so, can you delete them for the purpose of
getting help?
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
------------------------------
Date: Wed, 21 Mar 2007 16:20:54 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: perl feature request
Message-Id: <m2fy7ycpqx.fsf@local.wv-www.com>
"dt" <ppc@cheapbooks.com> writes:
> cache $html = load_as_string($fh, "filename.html");
>
> would be really cool. basically, if the var is not set, it sets the
> var. if it is set, it skips the call.
our $html ||= load_as_string($fh, 'filename.html');
Have a look at:
<http://perl.plover.com/TPC/1998/Hardware-notes.html#_Orcish_Maneuver_>
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: 21 Mar 2007 21:49:08 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: perl feature request
Message-Id: <56dnikF24e5adU1@mid.dfncis.de>
Uri Guttman <uri@stemsystems.com> wrote in comp.lang.perl.misc:
> >>>>> "d" == dt <ppc@cheapbooks.com> writes:
>
> d> I find the following useful and would like to see it as a new perl
> d> feature:
>
> d> I often have to cache a variable based on a complex function. it owuld
> d> be nice if perl had something like this built in. here is an example:
>
> d> our $html;
>
> that will mean $html is undef. where would another value come from?
From anywhere, it's a package variable. Unlike "my", "our" doesn't
reset the value at run time.
I quite agree with the rest of your posting.
Anno
------------------------------
Date: Wed, 21 Mar 2007 16:54:58 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: perl feature request
Message-Id: <x7r6rib6tp.fsf@mail.sysarch.com>
>>>>> "a" == anno4000 <anno4000@radom.zrz.tu-berlin.de> writes:
a> Uri Guttman <uri@stemsystems.com> wrote in comp.lang.perl.misc:
>> >>>>> "d" == dt <ppc@cheapbooks.com> writes:
>>
d> I find the following useful and would like to see it as a new perl
d> feature:
>>
d> I often have to cache a variable based on a complex function. it owuld
d> be nice if perl had something like this built in. here is an example:
>>
d> our $html;
>>
>> that will mean $html is undef. where would another value come from?
a> From anywhere, it's a package variable. Unlike "my", "our" doesn't
a> reset the value at run time.
of course i know what our is. but his example didn't show any other
assignment to it. he was looking for a static type variable and our was
all he could come up with. even file scoped my would be fine. the real
point was not knowing about ||=.
a> I quite agree with the rest of your posting.
as do i. :)
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Wed, 21 Mar 2007 22:27:05 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: perl feature request
Message-Id: <p2o8d4-uaa.ln1@osiris.mauzo.dyndns.org>
Quoth Uri Guttman <uri@stemsystems.com>:
> >>>>> "d" == dt <ppc@cheapbooks.com> writes:
>
> d> a datatype such as:
>
> d> cache $html = load_as_string($fh, "filename.html");
>
> d> would be really cool. basically, if the var is not set, it sets the
> d> var. if it is set, it skips the call.
>
> but you can't declare and also optionally assign. where would a preset
> value come from??
>
> d> it would have to still be there if the function is exited and recalled
> d> (same scope as our).
>
> easy. just declare it my in a block that also includes the sub:
<code snipped>
I was going to say 'in 5.10 this exact feature has been included, as the
new 'state' variables', but perlsub says
| B<Caveat>: the code at the right side of the assignment to a state
| variable will be executed every time; only the assignment is disabled.
| So, avoid code that has side-effects, or that is slow to execute. This
| might be optimized out in a future version of Perl.
Doesn't this make state variables, uh, rather useless? Given that they
are basically exactly equivalent to your example above, so all you save
is one compile-time block? Have I missed something?
> and that only fails if the html file is a false value (just '0', or
> empty) which is unlikely.
>
> in perl 5.10 you can do //= and test for defined and that solves that
> problem.
...well, unless undef is *also* a valid return value :). Also (to the
OP) note that testing for defined is perfectly possible in current
perls, just rather awkward:
{
my $html;
sub foo {
defined $html or $html = load_as_string(...);
}
}
An alternative solution to look into is Memoize. It has a rather
different set of appropriate uses, but if you [one] find yourself
[s himself] creating a whole lot of these loaded-only-once variables it
may be easier just to memoize the loading function.
Ben
--
Although few may originate a policy, we are all able to judge it.
Pericles of Athens, c.430 B.C.
ben@morrow.me.uk
------------------------------
Date: Wed, 21 Mar 2007 18:11:04 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: perl feature request
Message-Id: <x7ircub3av.fsf@mail.sysarch.com>
>>>>> "BM" == Ben Morrow <ben@morrow.me.uk> writes:
BM> Quoth Uri Guttman <uri@stemsystems.com>:
>>
>> easy. just declare it my in a block that also includes the sub:
BM> <code snipped>
BM> I was going to say 'in 5.10 this exact feature has been included, as the
BM> new 'state' variables', but perlsub says
BM> | B<Caveat>: the code at the right side of the assignment to a state
BM> | variable will be executed every time; only the assignment is disabled.
BM> | So, avoid code that has side-effects, or that is slow to execute. This
BM> | might be optimized out in a future version of Perl.
BM> Doesn't this make state variables, uh, rather useless? Given that they
BM> are basically exactly equivalent to your example above, so all you save
BM> is one compile-time block? Have I missed something?
well, it works fine for expressions with no side effects from what i
understand. so you can initilize it one time and the other times it gets
executed the expression results are tossed away. it would work in the
OP's example but it would cost a full file slurp each time. but if you
did something like state $foo = [ 1, 2, 3 ] then you would have that
only assigned the first time and then the [ 1, 2, 3] would still be
evaluated and then tossed away. yes it is clunky and not optimized. if
you care, then use the my in a private block with the sub and ||=.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: 21 Mar 2007 23:20:09 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: perl feature request
Message-Id: <56dst9F295645U1@mid.dfncis.de>
Ben Morrow <ben@morrow.me.uk> wrote in comp.lang.perl.misc:
>
> Quoth Uri Guttman <uri@stemsystems.com>:
> > >>>>> "d" == dt <ppc@cheapbooks.com> writes:
> >
> > d> a datatype such as:
> >
> > d> cache $html = load_as_string($fh, "filename.html");
> >
> > d> would be really cool. basically, if the var is not set, it sets the
> > d> var. if it is set, it skips the call.
> >
> > but you can't declare and also optionally assign. where would a preset
> > value come from??
> >
> > d> it would have to still be there if the function is exited and recalled
> > d> (same scope as our).
> >
> > easy. just declare it my in a block that also includes the sub:
>
> <code snipped>
>
> I was going to say 'in 5.10 this exact feature has been included, as the
> new 'state' variables', but perlsub says
>
> | B<Caveat>: the code at the right side of the assignment to a state
> | variable will be executed every time; only the assignment is disabled.
> | So, avoid code that has side-effects, or that is slow to execute. This
> | might be optimized out in a future version of Perl.
>
> Doesn't this make state variables, uh, rather useless? Given that they
> are basically exactly equivalent to your example above, so all you save
> is one compile-time block? Have I missed something?
No, they're not useless because they keep their value from one call to
another, while still being lexical variables. Currently, we must
declare a lexical variable outside the sub for that purpose.
Anno
------------------------------
Date: 21 Mar 2007 23:24:21 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: perl feature request
Message-Id: <56dt55F295645U2@mid.dfncis.de>
Uri Guttman <uri@stemsystems.com> wrote in comp.lang.perl.misc:
> >>>>> "a" == anno4000 <anno4000@radom.zrz.tu-berlin.de> writes:
>
> a> Uri Guttman <uri@stemsystems.com> wrote in comp.lang.perl.misc:
> >> >>>>> "d" == dt <ppc@cheapbooks.com> writes:
> >>
> d> I find the following useful and would like to see it as a new perl
> d> feature:
> >>
> d> I often have to cache a variable based on a complex function. it owuld
> d> be nice if perl had something like this built in. here is an example:
> >>
> d> our $html;
> >>
> >> that will mean $html is undef. where would another value come from?
>
> a> From anywhere, it's a package variable. Unlike "my", "our" doesn't
> a> reset the value at run time.
>
> of course i know what our is.
I know you do, but what you said seemed to imply otherwise.
Anno
------------------------------
Date: 21 Mar 2007 16:33:14 -0700
From: "DJ Stunks" <DJStunks@gmail.com>
Subject: Re: perl feature request
Message-Id: <1174519994.863496.276720@o5g2000hsb.googlegroups.com>
On Mar 21, 12:46 pm, "dt" <p...@cheapbooks.com> wrote:
> if ($html !~ /./)
> <snip>
> basically, if the var is not set...
this is a very poor test for "set"-ness
how about defined() or length()
-jp
------------------------------
Date: Thu, 22 Mar 2007 00:51:27 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: perl feature request
Message-Id: <k5h30310hjs2unogkouoblk2eeju88i65u@4ax.com>
On Wed, 21 Mar 2007 14:44:14 -0500, Uri Guttman <uri@stemsystems.com>
wrote:
> d> our $html;
>
>that will mean $html is undef. where would another value come from?
Nope:
#!/usr/bin/perl -l
use strict;
use warnings;
$main::html='foo';
{
our $html;
print $html;
}
__END__
This prints:
foo
for me.
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: Thu, 22 Mar 2007 00:55:58 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Perl/CGI file upload
Message-Id: <56dv4cF23cpa7U1@mid.individual.net>
Jerome wrote:
> The script needs to allow uploading any files from a form (without
> knowing the form structure in advance) - basically *any* files given
> to it.
Check out the CPAN module CGI::UploadEasy.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Wed, 21 Mar 2007 22:56:59 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: regex question
Message-Id: <etsddv.1lc.1@news.isolution.nl>
Abigail schreef:
> eldwindollente:
>> I'm new to regex. I have a string of 32 characters and i need to
>> ignore the first 28 characters, change the next 2 (29, 30) and
>> ignore the last 2 (31,32.)
>>
>> I have something like this so far s/AD01.{28}/xx/ but that's just
>> changing the 28 characters to XX.
>
> Don't bother using a regexp.
>
> substr ($str, 29, 2) = "XX";
>
> will do the trick.
Or substr($str, 28, 2, 'XX');
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
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 249
**************************************