[18494] in Perl-Users-Digest
Perl-Users Digest, Issue: 662 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 9 18:51:43 2001
Date: Mon, 9 Apr 2001 15:06:52 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <986853921-v10-i662@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 9 Apr 2001 Volume: 10 Number: 662
Today's topics:
Re: [Fwd: help a perl newbie with script] <jeffp@crusoe.net>
Re: [Fwd: help a perl newbie with script] <abe@ztreet.demon.nl>
Re: [Fwd: help a perl newbie with script] (Daniel)
Re: [Fwd: help a perl newbie with script] <krahnj@acm.org>
Re: cgi <bigusAT@btinternetDOT.com>
Re: complaint about moderation of this group (Mark Jason Dominus)
Re: complaint about moderation of this group (Anno Siegel)
Re: complaint about moderation of this group <joe+usenet@sunstarsys.com>
Re: complaint about moderation of this group <uri@sysarch.com>
Re: complaint about moderation of this group (Anno Siegel)
Re: complaint about moderation of this group <juex@deja.com>
Re: Criticism (searching a syslog) <jeff@neobase.com>
debug? Using ftell() and fseek() <milliwave@rfengineering.freeserve.co.uk>
Help with code debug tell and seek <milliwave@rfengineering.freeserve.co.uk>
Re: how can i get rid of ^M in files saved out using pe <bart.lateur@skynet.be>
Re: how can i get rid of ^M in files saved out using pe <elaine@chaos.wustl.edu>
Re: how to break a regexpr over a line? (John Joseph Trammell)
Re: how to improve this code? <uri@sysarch.com>
Net::SMTP, MIME::Base64, and binaries : ) <root@novastar.dtdns.net>
Re: Perl as an email client <mirvine@esatclear.ie>
Re: Perl as an email client <krahnj@acm.org>
Perl styling scripts <jamesfreeman@MailAndNews.com>
registration script <amazingkgb@earthlink.net>
Re: So what do YOU use Perl for? <mjcarman@home.com>
Re: So what do YOU use Perl for? <iltzu@sci.invalid>
There is a problem with this code containing tell and s <milliwave@rfengineering.freeserve.co.uk>
Re: tr question <bigusAT@btinternetDOT.com>
Re: unicode, perl and webbrowsers <flavell@mail.cern.ch>
Re: unicode, perl and webbrowsers <bart.lateur@skynet.be>
Re: unicode, perl and webbrowsers <flavell@mail.cern.ch>
Re: using dup() (Mark Jason Dominus)
Re: Using ftell() and fseek() (Anno Siegel)
Re: Want Lisp-like state machine impl. (John Joseph Trammell)
Where Can I Find More Information? (Steve K. Brown)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 9 Apr 2001 14:59:20 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: [Fwd: help a perl newbie with script]
Message-Id: <Pine.GSO.4.21.0104091458090.4502-100000@crusoe.crusoe.net>
[posted & mailed]
On Apr 9, Lincoln, D. E. (Daniel) said:
>Subject: help a perl newbie with script
Perhaps your subject should contain a hint of what you're having problems
with.
>"$name", "*1*;*2*;*3*;"
>
>I do not want the last ";" to be added to the line.
>Is there an easy solution to this in Perl?
>while (<INPUT>){
>chomp $_;
>print OUTPUT "*$_*;";
>}
You could test for eof(INPUT):
while (<INPUT>) {
chomp;
print OUTPUT "*$_*";
print OUTPUT ";" if not eof INPUT;
}
--
Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
Are you a Monk? http://www.perlmonks.com/ http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter. Brother #734
------------------------------
Date: Mon, 09 Apr 2001 22:16:23 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: [Fwd: help a perl newbie with script]
Message-Id: <2l54dtor0fenqbn70v1cn1oejko9t64pdj@4ax.com>
On Mon, 9 Apr 2001 14:59:20 -0400, Jeff Pinyan <jeffp@crusoe.net> wrote:
> [posted & mailed]
>
> On Apr 9, Lincoln, D. E. (Daniel) said:
>
> >Subject: help a perl newbie with script
>
> Perhaps your subject should contain a hint of what you're having problems
> with.
>
> >"$name", "*1*;*2*;*3*;"
> >
> >I do not want the last ";" to be added to the line.
> >Is there an easy solution to this in Perl?
>
> >while (<INPUT>){
> >chomp $_;
> >print OUTPUT "*$_*;";
> >}
>
> You could test for eof(INPUT):
>
> while (<INPUT>) {
> chomp;
> print OUTPUT "*$_*";
> print OUTPUT ";" if not eof INPUT;
> }
or use join() if INPUT is not large:
printf OUTPUT "%s\n", join ', ', map qq("$_") => '$name',
join ';', map { chomp; "*$_*" } <INPUT>;
--
Good luck, Abe
Amsterdam Perl Mongers http://amsterdam.pm.org
perl -e '$_=sub{split//,pop;print pop while@_};&$_("rekcah lreP rehtona tsuJ")'
------------------------------
Date: Mon, 09 Apr 2001 15:19:09 -0400
From: "Lincoln, D. E. (Daniel)" <dlincol1@ford.com>
To: japhy@pobox.com
Subject: Re: [Fwd: help a perl newbie with script]
Message-Id: <3AD20B2D.6C7325E9@ford.com>
Being a newbie I don't even know what the hint would be.
How about this: How do I keep a ';' from being added to the last output element.
I've already found a solution for this anyway:
using an array: chomp each element then use the join function:
@inp = <INPUT>;
close (INPUT);
foreach $el (@inp) {
chomp $el;
}
print OUTPUT join("*;*", (@inp));
print OUTPUT "*\"\n";
Jeff Pinyan wrote:
>
> [posted & mailed]
>
> On Apr 9, Lincoln, D. E. (Daniel) said:
>
> >Subject: help a perl newbie with script
>
> Perhaps your subject should contain a hint of what you're having problems
> with.
>
> >"$name", "*1*;*2*;*3*;"
> >
> >I do not want the last ";" to be added to the line.
> >Is there an easy solution to this in Perl?
>
> >while (<INPUT>){
> >chomp $_;
> >print OUTPUT "*$_*;";
> >}
>
> You could test for eof(INPUT):
>
> while (<INPUT>) {
> chomp;
> print OUTPUT "*$_*";
> print OUTPUT ";" if not eof INPUT;
> }
>
> --
> Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
> Are you a Monk? http://www.perlmonks.com/ http://forums.perlguru.com/
> Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/
> Acacia Fraternity, Rensselaer Chapter. Brother #734
--
Regards,
Daniel E. Lincoln - Ford Motor Company
R&VT Vehicle CAD Process & Methods
http://ae0581.pd8.ford.com/vcpm
------------------------------
Date: Mon, 09 Apr 2001 21:12:36 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: [Fwd: help a perl newbie with script]
Message-Id: <3AD225D6.A6CFC96E@acm.org>
"Lincoln, D. E. (Daniel)" wrote:
>
> -------- Original Message --------
> Subject: help a perl newbie with script
> Date: Fri, 06 Apr 2001 08:26:46 -0400
> From: "Lincoln, D. E. (Daniel)" <dlincol1@ford.com>
> Organization: R&VT VCP&M
> Newsgroups: comp.lang.perl
>
> I'm new to perl and have written a script that formats a file
> from this format:
>
> 1
> 2
> 3
>
> to this format:
>
> "$name", "*1*;*2*;*3*;"
>
> I do not want the last ";" to be added to the line.
> Is there an easy solution to this in Perl?
>
> Here is some of the code:
>
> # Begin formatting converted file
> print OUTPUT '"';
> print OUTPUT $name;
> print OUTPUT '", "';
>
> open(INPUT, "$ARGV[0]") || die "Can't open: $!\n";
>
> while (<INPUT>){
> chomp $_;
> print OUTPUT "*$_*;";
> }
>
> print OUTPUT '"';
> print OUTPUT "\n";
print OUTPUT qq("$name", "), join( ';', map { chomp and "*$_*" } <INPUT>
), qq("\n);
John
--
use Perl;
program
fulfillment
------------------------------
Date: Mon, 9 Apr 2001 20:17:55 +0100
From: "S Warhurst" <bigusAT@btinternetDOT.com>
Subject: Re: cgi
Message-Id: <9at1ho$5u7$1@plutonium.btinternet.com>
Browse what exactly? If you mean file browser, then that's standard HTML
where a text box has the type "file".
Spencer
*******************************
"Richard Dobson" <Richard_member@newsranger.com> wrote in message
news:KXiA6.771$FY5.38120@www.newsranger.com...
>
> Hi,
> does anyone know how to create a 'Browse..' function on a web page?
>
> thanks in advance
> Richard
>
>
------------------------------
Date: Mon, 09 Apr 2001 18:08:34 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: complaint about moderation of this group
Message-Id: <3ad1faab.2249$b9@news.op.net>
In article <9asln8$79d$2@mamenchi.zrz.TU-Berlin.DE>,
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
>You missed the specification:
>
> 'banana' while 1;
>
>Oops, that prints
>
>"Useless use of a banana in void context..."
That is why it is better to chop down the redwood with an igloo.
'igloo' while 1;
No warning.
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
Date: 9 Apr 2001 18:21:23 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: complaint about moderation of this group
Message-Id: <9asuj3$ajd$1@mamenchi.zrz.TU-Berlin.DE>
According to Mark Jason Dominus <mjd@plover.com>:
> In article <9asln8$79d$2@mamenchi.zrz.TU-Berlin.DE>,
> Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> >You missed the specification:
> >
> > 'banana' while 1;
> >
> >Oops, that prints
> >
> >"Useless use of a banana in void context..."
>
> That is why it is better to chop down the redwood with an igloo.
>
> 'igloo' while 1;
>
> No warning.
Interesting. It answers the question what a "loo" and a "gnoreme"
have in common. Is that documented?
Anno
------------------------------
Date: 09 Apr 2001 14:45:10 -0400
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: complaint about moderation of this group
Message-Id: <m3elv1ap55.fsf@mumonkan.sunstarsys.com>
Bart Lateur <bart.lateur@skynet.be> writes:
> Anno Siegel wrote:
> >
> > 1 while 'banana';
> >
> >That's it.
>
> It's not. It is continuing as long as you have a banana, not as long as
> the tree still stands.
>
> It looks as if perl considers bananas as lasting forever.
Relative to the expected lifespan of perl, bananas do last forever :)
#!/usr/bin/perl -w
VAN_WINKLE: {
{
$SIG{INT} = sub { warn "(yawn) ...not time yet... (roll over)" };
sleep until not "Redwood";
last VAN_WINKLE;
}
redo;
}
print "Tree downed by a banana\n";
--
Joe Schaefer "Life is far too important to be taken seriously."
-- Oscar Wilde
------------------------------
Date: Mon, 09 Apr 2001 18:46:34 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: complaint about moderation of this group
Message-Id: <x7k84tq5bq.fsf@home.sysarch.com>
>>>>> "AS" == Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> writes:
AS> According to Mark Jason Dominus <mjd@plover.com>:
>> In article <9asln8$79d$2@mamenchi.zrz.TU-Berlin.DE>,
>> Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
>> >You missed the specification:
>> >
>> > 'banana' while 1;
>> >
>> >Oops, that prints
>> >
>> >"Useless use of a banana in void context..."
>>
>> That is why it is better to chop down the redwood with an igloo.
>>
>> 'igloo' while 1;
>>
>> No warning.
AS> Interesting. It answers the question what a "loo" and a "gnoreme"
AS> have in common. Is that documented?
very obscurely. here is the code in op.c:
if (PL_dowarn) {
useless = "a constant";
if (SvNIOK(sv) && (SvNV(sv) == 0.0 || SvNV(sv) == 1.0))
useless = 0;
else if (SvPOK(sv)) {
if (strnEQ(SvPVX(sv), "di", 2) ||
strnEQ(SvPVX(sv), "ds", 2) ||
strnEQ(SvPVX(sv), "ig", 2))
useless = 0;
}
}
so any constant strings starting with those letter pairs are exempt from
the useless warning. and what are those letter pairs? well in the
pre-pod perl4 days, larry did some tricks to support inline nroff
documentation. you can find some of his very old scripts in /eg. here is
some of the trickery he was doing to make this work:
'di \" finish diversion--previous line must be blank
.nr nl 0-1 \" fake up transition to first page again
.nr % 0 \" start at page 1
';<<'.ex'; #__END__ ############# From here on it's a standard manual page ####
########
the last line has the quote that closes the 'di line and it makes the
rest of the file a long perl constant string which is ignore. so to turn
off warnings he added the above c code when the constant strings began
with those nroff commands.
i think perl6 will drop that compatibility. :)
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info: http://www.sysarch.com/perl/OOP_class.html
------------------------------
Date: 9 Apr 2001 19:16:55 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: complaint about moderation of this group
Message-Id: <9at1r7$fdf$2@mamenchi.zrz.TU-Berlin.DE>
According to Uri Guttman <uri@sysarch.com>:
> >>>>> "AS" == Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> writes:
>
> AS> According to Mark Jason Dominus <mjd@plover.com>:
> >> In article <9asln8$79d$2@mamenchi.zrz.TU-Berlin.DE>,
> >> Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> >> >You missed the specification:
> >> >
> >> > 'banana' while 1;
> >> >
> >> >Oops, that prints
> >> >
> >> >"Useless use of a banana in void context..."
> >>
> >> That is why it is better to chop down the redwood with an igloo.
> >>
> >> 'igloo' while 1;
> >>
> >> No warning.
>
> AS> Interesting. It answers the question what a "loo" and a "gnoreme"
> AS> have in common. Is that documented?
>
> very obscurely. here is the code in op.c:
>
> if (PL_dowarn) {
> useless = "a constant";
^^^^^^^^
"banana", for sure.
> if (SvNIOK(sv) && (SvNV(sv) == 0.0 || SvNV(sv) == 1.0))
> useless = 0;
> else if (SvPOK(sv)) {
> if (strnEQ(SvPVX(sv), "di", 2) ||
> strnEQ(SvPVX(sv), "ds", 2) ||
> strnEQ(SvPVX(sv), "ig", 2))
> useless = 0;
> }
> }
>
> so any constant strings starting with those letter pairs are exempt from
> the useless warning. and what are those letter pairs? well in the
> pre-pod perl4 days, larry did some tricks to support inline nroff
> documentation. you can find some of his very old scripts in /eg. here is
> some of the trickery he was doing to make this work:
>
> 'di \" finish diversion--previous line must be blank
> .nr nl 0-1 \" fake up transition to first page again
> .nr % 0 \" start at page 1
> ';<<'.ex'; #__END__ ############# From here on it's a standard manual page ####
> ########
>
>
> the last line has the quote that closes the 'di line and it makes the
> rest of the file a long perl constant string which is ignore. so to turn
> off warnings he added the above c code when the constant strings began
> with those nroff commands.
Oh... right. I vaguely remember taking note that Perl pays some
respect to nroff syntax. I think I thought it would come back to me
should I ever need that information. Well, it didn't :)
> i think perl6 will drop that compatibility. :)
One would hope so. Not to propagate orthogonality on clpm, but
a tad fewer warts could do cosmetic wonders.
Anno
------------------------------
Date: Mon, 9 Apr 2001 12:35:11 -0700
From: "Jürgen Exner" <juex@deja.com>
Subject: Re: complaint about moderation of this group
Message-Id: <3ad20ef1@news.microsoft.com>
"Scott" <admin@gatordev.net> wrote in message
news:3ACF7AC8.31D50E6C@gatordev.net...
[...]
> If I had a CGI related question I would post it here instead of to
> some low volume group where I am unlikely to get a reply.
Well, if high traffic is your criteria then I would suggest to post your
questions to one of the alt.sex.* groups.
SCNR :-)
jue
------------------------------
Date: Mon, 9 Apr 2001 12:06:56 +0000
From: jeff <jeff@neobase.com>
Subject: Re: Criticism (searching a syslog)
Message-Id: <Pine.BSF.4.21.0104091159370.37966-100000@perlchimp.com>
On Mon, 9 Apr 2001, Bart Lateur wrote:
> John Doe wrote:
>
> >use CGI qw/-debug :standard/;
> >
> >print header;
> >our $tnMon = param(endMon); our $tnDay = param(endDay); our $tnYear = param(endYear); # Test ending dates
> >our $tsMon = param(startMon); our $tsDay = param(startDay); our $tsYear = param(startYear); # Test starting dates
>
> Can't you combine the param call to return multiple values at once?
>
> Apparently not. One of the reasons I really don't like CGI.pm.
Yes, you can.
use CGI qw(:standard);
my $cgi = new CGI;
my %params = $cgi->Vars;
Any cgi variable with more than one value will be padded with \0 in
$params{'variable_name'}.
To put them into an array:
my @vars = split "\0", $params{'variable_name'};
Jeff
------------------------------
Date: Mon, 9 Apr 2001 22:17:51 +0100
From: "Milliwave" <milliwave@rfengineering.freeserve.co.uk>
Subject: debug? Using ftell() and fseek()
Message-Id: <9at8pc$fg2$1@news7.svr.pol.co.uk>
The following code does "not" execute from the for loop downwards, or
atleast
it is not doing what it is supposed to do!
During the "1st while loop" - first pass of the COUNT_FILE
I record the $arraylength, which I feedthrough and count down
within the "for" loop! The $arraylength is fed through to the
seek function which in turn starts off the 2nd while loop.
But as pointed the code following the for loop does not
execute????? or atleast the $index does not decrement??
#!/apps/perl/bin/perl5.001
open(COUNT_FILE, "data.txt") or die "cannot find the CIF FILE:\n";
open(COUNTOUT, ">testseek.txt");
my @position=();
while (<COUNT_FILE>)
{
chomp;
$position[$i] = tell COUNT_FILE if ($_ =~ m/^DS1\s(\d*)\s(\d*)\s(\d*);/);
$i++;
}
$arraylength = @position;
for ($index =$arraylength ; $index>0; $index--)
{
seek COUNT_FILE, $position[$index], 0;
printf(COUNTOUT "$position[$index]\n");
while (<COUNT_FILE>)
{
chomp;
if ($_ =~ /^D1/)
{
printf(COUNTOUT "$_\n");
exit;
}
else
{
printf(COUNTOUT "$_\n");
}
}
}
close COUNT_FILE;
close COUNTOUT;
Milliwave wrote in message <9aiklo$dvj$1@news5.svr.pol.co.uk>...
>Hello,
>
>I would like someone to inform me how I would go about using the above two
>functions ftell() and fseek() to move within a file
>
>for example if I want to move to "five" and print everything which follows
>into another file
>how would I go about using the above functions in Perl?
>
>file.txt contents
>
>one
>tow
>ther
>five
>two
>three
>four
>end of file
>
>cheers
>Ken
>
>
>
>
------------------------------
Date: Mon, 9 Apr 2001 22:15:11 +0100
From: "Milliwave" <milliwave@rfengineering.freeserve.co.uk>
Subject: Help with code debug tell and seek
Message-Id: <9at8kd$2vs$1@news5.svr.pol.co.uk>
The following code does "not" execute from the for loop downwards, or
atleast
it is not doing what it is supposed to do!
During the "1st while loop" - first pass of the COUNT_FILE
I record the $arraylength, which I feedthrough and count down
within the "for" loop! The $arraylength is fed through to the
seek function which in turn starts off the 2nd while loop.
But as pointed the code following the for loop does not
execute????? or atleast the $index does not decrement??
#!/apps/perl/bin/perl5.001
open(COUNT_FILE, "data.txt") or die "cannot find the CIF FILE:\n";
open(COUNTOUT, ">testseek.txt");
my @position=();
while (<COUNT_FILE>)
{
chomp;
$position[$i] = tell COUNT_FILE if ($_ =~ m/^DS1\s(\d*)\s(\d*)\s(\d*);/);
$i++;
}
$arraylength = @position;
for ($index =$arraylength ; $index>0; $index--)
{
seek COUNT_FILE, $position[$index], 0;
printf(COUNTOUT "$position[$index]\n");
while (<COUNT_FILE>)
{
chomp;
if ($_ =~ /^D1/)
{
printf(COUNTOUT "$_\n");
exit;
}
else
{
printf(COUNTOUT "$_\n");
}
}
}
close COUNT_FILE;
close COUNTOUT;
------------------------------
Date: Mon, 09 Apr 2001 18:06:51 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: how can i get rid of ^M in files saved out using perl?
Message-Id: <siu3dt8punlq0s2sfdeonvq7kphtccua71@4ax.com>
Chile wrote:
>i have a simple form where i type stuff into a textarea input box and then i
>take the input and save it to a file but returns are represented by ^M's and
>when i read it back i get wired indents and stuff
>
>any ideas?
tr/\r//d;
but you need to apply that to the variable containing your multiline
text ($_ by default).
--
Bart.
------------------------------
Date: Mon, 09 Apr 2001 21:55:42 GMT
From: "Elaine Ashton" <elaine@chaos.wustl.edu>
Subject: Re: how can i get rid of ^M in files saved out using perl?
Message-Id: <ydqA6.8738$cF.187053@news1.nokia.com>
"Chile" <abcd@ntlworld.com> wrote in message
news:MSlA6.3810$Fm4.1059657@news2-win.server.ntlworld.com...
> i have a simple form where i type stuff into a textarea input box and
then i
> take the input and save it to a file but returns are represented by ^M's
and
> when i read it back i get wired indents and stuff
http://history.perl.org/oneliners/filters/dos2unix.html
e.
------------------------------
Date: Mon, 09 Apr 2001 20:42:56 GMT
From: trammell@bayazid.hypersloth.invalid (John Joseph Trammell)
Subject: Re: how to break a regexpr over a line?
Message-Id: <slrn9d45jj.4jd.trammell@bayazid.hypersloth.net>
On Mon, 9 Apr 2001 15:00:37 +0000 (UTC), Thomas L. wrote:
> I have a long regexpr. Is there any chance to break this line over two
> line?
>
> while
> ($line=~/^[^,]+,[^,]+,\"([^\"]+)\",(\d+),\"(\d+:\d+)\",\d+,(\d+),(\d+),\"(\d
> +:\d+)\",\"(\d+:\d+)\",\"(\d+:\d+)\",/)
You're probably looking for the /x modifier, which allows addition
of whitespace to the pattern in certain circumstances. Look for
documentation on 'perlre' for more details.
Just to be a pain -- why are you escaping all those quotes?
--
Aren't you, at this point, cutting down a California Redwood using a
banana *and* a particle accelerator?
- Bernard El-Hagin, in CLPM
------------------------------
Date: Mon, 09 Apr 2001 18:16:39 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: how to improve this code?
Message-Id: <x7n19qos55.fsf@home.sysarch.com>
>>>>> "A" == Abigail <abigail@foad.org> writes:
A> my %h = map {$_ => 1} qw /From Subject To Reply-To Cc/;
A> while ($records [$number_of_mails] {"Header"} =~ /^(\S+):\s+(.+)/m) {
^
missing /g option. otherwise while will infinite loop over the first match
A> $records [$number_of_mails] {$1} = $2 if $h {$1};
A> }
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info: http://www.sysarch.com/perl/OOP_class.html
------------------------------
Date: Tue, 10 Apr 2001 00:23:08 +0200
From: "novastar" <root@novastar.dtdns.net>
Subject: Net::SMTP, MIME::Base64, and binaries : )
Message-Id: <9at97k$1a5$1@usenet.otenet.gr>
# Here is a script that will send text emails with unlimited
# binary files as attachments. The emails are parsed
# corectly from microsoft outllook which recognizes the
# Base64 encoded files as attachments. So if your ISP
# have a standard installation of perl, there is no
# need to beg him install the MIME::Lite module !
# This script is tested on Windows NT4 only.
# George Bouras
# root@novastar.dtdns.net
use Net::SMTP;
use MIME::Base64;
my $sender = 'lgm@universe.mars' ;
my $receiver = 'root@novastar.dtdns.net' ;
my $email_subject = 'place here the email subject !' ;
my $email_message = 'write here the email body message' ;
my $email_server = 'mailgate.otenet.gr' ;
my @attachment=();
# Bellow you can declare all the binary files you want to attach
# the email. They can be as many you want. Be carefull
# that every binary file is an item of the @attachment array.
$attachment[0]='h:/website/skywalker/careerpages/unisystems14.htm';
$attachment[1]='image1.gif';
$attachment[2]='image2.gif';
$attachment[3]='image3.gif';
$attachment[4]='image4.gif';
my $sep ='-----===== b*i*g*l*o*v*e =====-----'; # This is the separator !!!
my @body_data =();
push @body_data, "\n\nThis is a multi-part message in MIME format.\n\n";
push @body_data, '------=_NextPart_'.$sep."\n";
push @body_data, 'Content-Type: text/plain;'."\n\t";
push @body_data, 'charset="en-US"'."\n";
push @body_data, 'Content-Transfer-Encoding: 7bit'."\n\n";
push @body_data, $email_message;
# Here is the code that will attach the binarie files to
# the email and generate the appropriate smtp headers
for (0..$#attachment)
{
$attachment[$_]=~/\//g?(($file_name)=$attachment[$_]=~/^.*\/(.*)$/):(($file_name)=$attachment[$_]=~/(.*)/);
push @body_data, "\n\n------=_NextPart_$sep\n";
push @body_data, 'Content-Type: application/octet-stream;'."\n\t";
push @body_data, 'name="'.$file_name."\"\n";
push @body_data, "Content-Transfer-Encoding: base64\n";
push @body_data, "Content-Disposition: attachment;\n\t";
push @body_data, 'filename="'.$file_name."\"\n\n";
open(input_file, "<$attachment[$_]");
binmode input_file, ":raw";
while (read(input_file, $line, 57))
{
push (@body_data, encode_base64($line))
}
close input_file;
}
push @body_data, "\n".$attachment_sererator."\n\n" ;
# Net::SMTP on action !
$smtp=new Net::SMTP
($email_server ,
Hello => $email_server ,
Timeout => 10 );
$smtp->mail ($sender) ;
$smtp->to ($receiver) ;
$smtp->verify ($receiver) ;
$smtp->data () ;
$smtp->datasend ("From: $sender") ; $smtp->datasend("\n");
$smtp->datasend ("To: $receiver") ; $smtp->datasend("\n");
$smtp->datasend ("Date: ".scalar localtime) ; $smtp->datasend("\n");
$smtp->datasend ('MIME-Version: 1.0') ; $smtp->datasend("\n");
$smtp->datasend ('Content-Type: multipart/mixed; boundary="----=_NextPart_'.$sep.'"'); $smtp->datasend("\n");
$smtp->datasend ('X-Mailer: Perl cgi mailer') ; $smtp->datasend("\n");
$smtp->datasend ('Importance: Normal') ; $smtp->datasend("\n");
$smtp->datasend ("Subject: $email_subject") ; $smtp->datasend("\n");
$smtp->datasend (@body_data) ;
$smtp->datasend () ;
$smtp->quit ;
------------------------------
Date: Mon, 09 Apr 2001 21:14:36 GMT
From: "Mark Irvine" <mirvine@esatclear.ie>
Subject: Re: Perl as an email client
Message-Id: <0DpA6.25123$PF4.39491@news.iol.ie>
Check out Pronto at http://www.muhri.net/pronto
It's a GTK mail client written in perl.
In article <3AD1F7DF.AC1875A5@lucent.com>, "Dionte S Wilson"
<dsw4@lucent.com> wrote:
> Has anyone ever used perl to simulate an email client? If so, was it
> alot of effort. I'm thinking about writing a generic email client using
> PERL.
>
>
------------------------------
Date: Mon, 09 Apr 2001 21:24:03 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Perl as an email client
Message-Id: <3AD22882.5AC37281@acm.org>
Dionte S Wilson wrote:
>
> Has anyone ever used perl to simulate an email client? If so, was it alot of
> effort. I'm thinking about writing a generic email client using PERL.
Pronto/CSCMail http://www.perl.com/reference/query.cgi?mail
John
--
use Perl;
program
fulfillment
------------------------------
Date: Mon, 9 Apr 2001 14:42:50 -0400
From: james freeman <jamesfreeman@MailAndNews.com>
Subject: Perl styling scripts
Message-Id: <3B19B878@MailAndNews.com>
Hi
I have been toying with some perl editor scripts for the last couple of
years
and am finally happy that they are robust enough for a beta distribution.
These scripts process rough and ready perl scripts and massage them into
elegantly formatted widgets along the lines of the style guide in the camel
book.
Where is the most appropriate forum to post them so that they can be
thoroughly picked over?
James
jfreeman@tassie.net.au
------------------------------------------------------------
Get your FREE web-based e-mail and newsgroup access at:
http://MailAndNews.com
Create a new mailbox, or access your existing IMAP4 or
POP3 mailbox from anywhere with just a web browser.
------------------------------------------------------------
------------------------------
Date: Mon, 09 Apr 2001 21:46:52 GMT
From: "Atayarani" <amazingkgb@earthlink.net>
Subject: registration script
Message-Id: <g5qA6.2137$Ak1.225957@newsread2.prod.itd.earthlink.net>
I am very new to Perl, but hope that I will get some helpful responses. I
am trying to create a script for my page, in which a user can register (for
benefits unknown) and all information submitted is sent to a specified email
address. I currently am using a script copied from a book, for a start. It
did not work, I got an Internal Server Error. The permissions are correct,
and the path is correct. I have no idea where it went wrong.
-atayarani
------------------------------
Date: Mon, 09 Apr 2001 14:20:44 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: So what do YOU use Perl for?
Message-Id: <3AD20B8C.F74D1F4@home.com>
Szilvia Oszko wrote:
>
> One recurring theme in this newsgroup seems to be that Perl!=CGI and
> that while Perl is often used to write CGI scripts, it can also be used
> to do a lot of other things. I'd be curious to see what non-CGI stuff
> you do with Perl.
* Writing Ada. (i.e. Autocoding)
* Checking source code files for standards compliance.
* Doing SLOC (Source Lines Of Code) counts.
* Converting between decimal and reverse-octal. (ARINC 429)
* Searching through files which have *not* been formatted for human
consumption and generating meaningful reports out of them.
* Searching through files which have *not* been formatted for human
consumption and looking for errors. (The compiler did WHAT?)
* Tons of quick "one-shot" scripts for modifying text files in ways
that a simple search/replace isn't intelligent enough to do.
* Correlating data spread across multiple files.
-mjc
------------------------------
Date: 9 Apr 2001 20:49:16 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: So what do YOU use Perl for?
Message-Id: <986846141.4415@itz.pp.sci.fi>
In article <3ACFB415.63D2CA91@gmu.edu>, Szilvia Oszko wrote:
>One recurring theme in this newsgroup seems to be that Perl!=CGI and
>that while Perl is often used to write CGI scripts, it can also be used
>to do a lot of other things. I'd be curious to see what non-CGI stuff
>you do with Perl.
* Posting this message.
* If I type "google some phrase" in a shell window, a small Perl script
I wrote starts up lynx and feeds it the appropriate query. Another
such script gets dictionary and thesaurus results from www.m-w.com.
The feeling of having the world at my fingertips is simply amazing.
* Whenever I add or delete pages to a website I maintain, I run a Perl
script that autogenerates the appropriate "previous" / "next" links
on each page. Doing it any other way would be a pain.
* "rename 's/htm$/html/' *.htm"
* I use procmail and Perl to provide automatic responses to e-mails
sent to certain addresses. Try ada@itz.pp.sci.fi for example. I
also use them to make my usenet addresses expire after a fortnight.
* A more versatile substitute for grep and sed.
* A project I used to work on had some immense function libraries that
followed a rather pointless scheme. I used some really scary Perl
one-liners to split the files into functions (+associated comments),
figure out what part of the project each function belonged to, and
write a new set of smaller, more sensibly organized library files.
* Mangling a humongous, not quite regularly structured file exported as
text from Excel into a list of SQL statements to import the data into
a proper relational database.
* Silly word list tricks, like finding pairs of words that rot13 into
each other such as "or" / "be" and "nowhere" / "abjurer".
* JAPHs.
Of course, I also use it for CGI quite extensively. Most of the scripts
I've written are not CGI, but if one discounts throwaways and one-liners
the ratio gets closer to even. Though I do occasionally whip up a small
throwaway CGI script just to test something.
"Swiss Army Chainsaw" pretty much sums it up.
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla / Kira -- do not feed the troll.
------------------------------
Date: Mon, 9 Apr 2001 22:14:41 +0100
From: "Milliwave" <milliwave@rfengineering.freeserve.co.uk>
Subject: There is a problem with this code containing tell and seek
Message-Id: <9at8jf$plh$1@news6.svr.pol.co.uk>
The following code does "not" execute from the for loop downwards, or
atleast
it is not doing what it is supposed to do!
During the "1st while loop" - first pass of the COUNT_FILE
I record the $arraylength, which I feedthrough and count down
within the "for" loop! The $arraylength is fed through to the
seek function which in turn starts off the 2nd while loop.
But as pointed the code following the for loop does not
execute????? or atleast the $index does not decrement??
#!/apps/perl/bin/perl5.001
open(COUNT_FILE, "data.txt") or die "cannot find the CIF FILE:\n";
open(COUNTOUT, ">testseek.txt");
my @position=();
while (<COUNT_FILE>)
{
chomp;
$position[$i] = tell COUNT_FILE if ($_ =~ m/^DS1\s(\d*)\s(\d*)\s(\d*);/);
$i++;
}
$arraylength = @position;
for ($index =$arraylength ; $index>0; $index--)
{
seek COUNT_FILE, $position[$index], 0;
printf(COUNTOUT "$position[$index]\n");
while (<COUNT_FILE>)
{
chomp;
if ($_ =~ /^D1/)
{
printf(COUNTOUT "$_\n");
exit;
}
else
{
printf(COUNTOUT "$_\n");
}
}
}
close COUNT_FILE;
close COUNTOUT;
------------------------------
Date: Mon, 9 Apr 2001 20:15:23 +0100
From: "S Warhurst" <bigusAT@btinternetDOT.com>
Subject: Re: tr question
Message-Id: <9at1cv$5md$1@plutonium.btinternet.com>
Say $text is the variable containing "sdgsf sdfr ewef.............." then
the following will get rid of the whitespace at the END of the string:
$text =~ s/\s+$//;
Make a note of it, you'll probably need it again.. Also, to get rid of
whitespace at the BEGINNING of a line, use:
$text =~ s/^\s+//;
Okay looking in a FAQ is good discipline but I think it's more helpful to
give ppl the answer & then tell them where the FAQ is they should have
looked in!
http://language.perl.com/faq/
Spencer
*****************************
"Sven Buggermann" <buggerma@de.ibm.com> wrote in message
news:9arsd0$s02$1@news.btv.ibm.com...
> Hi ,
> i want to cut of whitespaces at the end of a string
> eg
>
> "sdgsf sdfr ewef.............."
> .... = whitespaces
> i want to have
> "sdgsf sdfr ewef"
>
> can someone tell me how to do do that ?
> thx in advance
> Sven
>
>
>
------------------------------
Date: Mon, 9 Apr 2001 21:17:04 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: unicode, perl and webbrowsers
Message-Id: <Pine.LNX.4.30.0104092055460.6935-100000@lxplus003.cern.ch>
On Mon, 9 Apr 2001, peter pilsl wrote:
> My test-script (using the CGI-module) produces a form, saves the submitted
> values to a postgreSQL-database and allows to view saved entries. Encoding
> of the HTML-output is UTF-8 everywhere, cause I want to combine german,
> english, russian and several baltic languages even in one sentence and
> want this script being usable by people in russia and people in serbia and
> germany and usa.
As an overview of what you're doing, this seems a reasonable
description. But we need more detail of the parts, or a demonstration
URL where we can look at what's happening, and see if it meets our
expectations of what should happen at that point.
> I did no more than writing UTF-8 in the html-header and it works perfect
> with Internetexplorer 5.5 and less perfect with Netscape 4.x.
What do you want to discuss at this point? If you want to understand
how to write utf-8-coded HTML, you've come to the wrong place, you
ought to be at comp.infosystems.www.authoring.html, or if it's browser
shortcomings you're mad at then maybe the relevant browsers group in
that hierarchy.
But if you already grok that but you're not sure whether your Perl
code is generating the right coded characters, then you're in the
right place here; but you don't seem to be showing us any Perl code.
> Netscape
> shows the entries saved with IE55 fine, but I cant enter any language with
> different charsets (switching to russian keyboard in w2k just produces
> ugly-signs).
But now you are a very long way away from Perl.
> Opera 5 doesnt view and doesnt allow to enter ...
Opera doesn't really support i18n yet, I would suggest you set it
aside in this discussion.
> Is this a problem of this browsers
We don't know, because you aren't really showing us anything.
If you want to test your browser, try Alan Wood's pages, or my
machine-generated reformatting of the Unicode database:
http://ppewww.ph.gla.ac.uk/~flavell/unicode/
Make sure NS4 is configured to use a worthwhile font under the
"Unicode" setting (and maybe set the option which refuses HTML
authors' font specifications, which are likely to make matters worse
rather than better when doing i18n).
Edit -> Preferences -> Appearance -> Fonts -> Unicode
If you have it, then choose Arial Unicode MS. If not, then either get
Bitstream Cyberbit v2 (free download available from netscape last time
I looked) or, for a much smaller but still useful repertoire, Lucida
Sans Unicode.
> Somehow I am really confused about all this stuff and dont figure out,
> what part of the unicode-stuff belongs to the browser, to perl, to the
> cgi-module, to my script, to my Operatingsystem ...
That's the way it seems to me, too. I would recommend studying the
other parts of the problem first (i.e the ones that don't have any
Perl in them) so you have a better understanding of what it is that
you're trying to implement.
Do some coding of the HTML by hand, do some submitting of text area
inputs by hand (and, OK, use a Perl script to dump it out so you can
see what's arriving at the server).
> So please anyone give a short intruction or a good link.
Each of these pages of mine seems to me to have some relevance to the
HTML part of your quest. Nearby you'll also find links to other sites
and to authoritative specifications.
http://ppewww.ph.gla.ac.uk/~flavell/charset/quick
http://ppewww.ph.gla.ac.uk/~flavell/charset/checklist (specifically
the scenarios denoted there as 6 and 7),
http://ppewww.ph.gla.ac.uk/~flavell/charset/form-i18n.html
good luck
------------------------------
Date: Mon, 09 Apr 2001 19:48:54 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: unicode, perl and webbrowsers
Message-Id: <0544dts56l35gfacev13iio0e8k88vofvh@4ax.com>
Off topic, but anyway... Let's get this over with.
peter pilsl wrote:
>I want to combine german,
>english, russian and several baltic languages even in one sentence
>I did no more than writing UTF-8 in the html-header and it works perfect
>with Internetexplorer 5.5 and less perfect with Netscape 4.x. Netscape
>shows the entries saved with IE55 fine, but I cant enter any language with
>different charsets (switching to russian keyboard in w2k just produces
>ugly-signs).
>Is this a problem of this browsers (netscape is listed as unicode-
>compliant under www.unicode.org) or should I include some extra unicode-
>steps in my scripts ?
Nope. Netscape bug. It happens if you use numerical entities too.
Netscape 4.x *only* properly displays those entities, if they do map
properly to the currently selected code page. So I need to specify
ISO-8859-2 (instead of UTF-8) in order to properly display Polish, for
example. There's no way AFAIK that you can combine Russian and French in
one sentence, or even on one page, in Netscape 4.x.
People who are accustomed to viewing multiple language, probably are all
aware of the problem. So there's not much more that you can do than tell
them to use another browser. :-(.
>Netscape shows the entries saved with IE55 fine
Heh?
--
Bart.
------------------------------
Date: Mon, 9 Apr 2001 22:27:52 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: unicode, perl and webbrowsers
Message-Id: <Pine.LNX.4.30.0104092214170.6935-100000@lxplus003.cern.ch>
On Mon, 9 Apr 2001, Bart Lateur wrote:
> Off topic, but anyway... Let's get this over with.
...and help to demonstrate the risks of off-topic answers... :-}
> Netscape bug.
There is a relevant Netscape 4 bug, agreed. But it _can_ still cope
with either utf-8 coded characters _or_ &#bignumber; representations
as long as you tell it the charset is utf-8. My checklist should
help: http://ppewww.ph.gla.ac.uk/~flavell/charset/checklist
> It happens if you use numerical entities too.
> Netscape 4.x *only* properly displays those entities, if they do map
> properly to the currently selected code page. So I need to specify
> ISO-8859-2 (instead of UTF-8) in order to properly display Polish, for
> example.
No Sir: if you've got your Unicode font properly configured, then
it'll work with utf-8 selected as the coding.
Right this moment I'm looking with Netscape 4.61 at
http://ppewww.ph.gla.ac.uk/~flavell/unicode/unidata01.html
which is a utf-8-coded document, and all the &#number; representations
in the third column are being displayed correctly, with the sole
exceptions of U+01F6 to U+01F9 inclusive. I'm using Arial Unicode MS
as the unicode font.
> There's no way AFAIK that you can combine Russian and French in
> one sentence, or even on one page, in Netscape 4.x.
Absolutely wrong. Mind you, I've never _seen_ it working to spec in
Netscape on OSes other than Windozes: but if you have a Unicode-
capable X server it ought to work (and we no longer have Macs in this
area, so the fact that I haven't seen one working doesn't actually say
much).
------------------------------
Date: Mon, 09 Apr 2001 18:06:30 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: using dup()
Message-Id: <3ad1fa2e.223c$344@news.op.net>
In article <3ad1f6f7.21d2$294@news.op.net>,
Mark Jason Dominus <mjd@plover.com> wrote:
>Two strategies are possible:
I thought of another one. On a unix system, you can use the standard
"tee" program to copy your output to a file:
open(STDOUT, "| tee /tmp/logfile");
What this does is run the 'tee' program, and attach STDOUT to the
input of 'tee'. 'tee' reads the data you send it, prints it out to
whatever your STDOUT used to be attached to, and also prints a copy
into /tmp/logfile:
Before:
STDOUT ------------------------> screen
After:
STDOUT ----------> tee -----------> screen
`
\
+-----------> /tmp/logfile
Now everything your program writes will appear in both places.
You probably want to set $| = 1 after you do this.
If you don't have 'tee', it's easy to write it:
#!/usr/bin/perl
# 'tee'
my $file = shift or die "Usage: $0 filename";
open FILE, "> $file" or die "$0: Couldn't open file $file: $!";
while (read STDIN, my $buf, 8192) {
print $buf;
print FILE $buf;
}
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
Date: 9 Apr 2001 19:04:30 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Using ftell() and fseek()
Message-Id: <9at13u$fdf$1@mamenchi.zrz.TU-Berlin.DE>
According to <nobull@mail.com>:
> If you really want help here then learn the rules of common courtesy -
> post in the right order.
>
> "Milliwave" <milliwave@rfengineering.freeserve.co.uk> writes:
> > >> I would like someone to inform me how I would go about using the
> > >> above two functions ftell() and fseek() to move within a file
> > >
> > >ftell() and fseek() ?? Those are the system calls, but the Perl
> > >functions are simply tell and seek.
> > >
> > >> for example if I want to move to "five" and print everything which
> > >> follows into another file how would I go about using the above
> > >> functions in Perl?
> > >
> > >'move to "five"' isn't really the type of thing for which you use
> > >seek. Is there some reason that you want (or need) to solve this
> > >problem with tell and seek?
>
> > Yes, there is a particular reason for doing this, because if I have
> > a large file, while I would like to have access to specific lines
> > within a text file over and over again.
>
> > for example
> >
> > one
> > two
> > three
> > my
> > to
> > go
> > the
> > and so
> > on
> >
> > And I would like to jump to these line say "go" and read everything
> > which follows go, then I would like the pointer to jump to two and
> > read everythingthing which follows and so forth
>
> On the first pass though the file record the file pointer at each line
> that is a possible target.
>
> my %position;
>
> while (<FILE>) {
> chomp;
> $position{$_} = tell FILE if some_condition;
> }
Ah... There's a snag here. With the content of a line you are
recording the position of the following line. You'll want some
equivalent of
while ( 1 ) {
my $position = tell DATA;
$_ = <DATA>;
last unless defined $_;
$position{$_} = $position if some_condition;
}
> Where some_condition is a regex that detects lines that you may
> want to be able to jump to later otherwise the as is going to be huge.
When dealing with a sorted file or if you want to access through
line numbers, "some_condition" can be as simple as "store every n-th
line". You can still determine the interval a given record must be
in. With n = 100, you will never have to search through more than
100 lines on disk while storing 1% of the lines. It's quite efficient
for some purposes.
Anno
------------------------------
Date: Mon, 09 Apr 2001 21:19:02 GMT
From: trammell@bayazid.hypersloth.invalid (John Joseph Trammell)
Subject: Re: Want Lisp-like state machine impl.
Message-Id: <slrn9d47n8.4pg.trammell@bayazid.hypersloth.net>
On Thu, 05 Apr 2001 19:21:04 GMT, David Bakhash wrote:
> Hi,
>
> I'm writing because I'm implementing something in Perl now, and I'd
> *really* like it to look Lispy.
>
> I'm not too sure that Perl isn't capable, but it's certainly not as
> straight-forward as if done in Common Lisp.
[lispy pseudocode snipped]
Should be pretty easy to implement something that meets your
needs, with the possible exception of specifying types in a
weakly-typed language like Perl. Any ideas on how you plan
to enforce these types?
------------------------------
Date: 9 Apr 2001 22:06:17 GMT
From: skbrown@vcd.hp.com (Steve K. Brown)
Subject: Where Can I Find More Information?
Message-Id: <9atbop$79n$1@news.vcd.hp.com>
I am looking for more information about the unpack's
ability to perform a checksum. I have tried the
FAQ and the Camel book. They both say the same thing and
that is pretty minimal. Is there another
source out there somewhere that has more information?
If so where is it?
------------------------------
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.
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 662
**************************************