[9904] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3497 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 20 23:07:20 1998

Date: Thu, 20 Aug 98 20:00:25 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 20 Aug 1998     Volume: 8 Number: 3497

Today's topics:
    Re: 2 quick questions jhildeb2@my-dejanews.com
    Re: [Q] deprecated use of split (what? why?) (Larry Rosler)
    Re: Call another perl script? (Tad McClellan)
        Cisco router telnet program <aperry@symantec.com>
    Re: Code Style (Was: How to sort this associative array <zenin@bawdycaste.org>
    Re: Code Style (Was: How to sort this associative array (Abigail)
    Re: Coderef as hash-index (Chris Russo)
    Re: comp.lang.perl.announce redux <rra@stanford.edu>
    Re: Delay in bidirectional communication between Perl a <spamsux-tex@habit.com>
    Re: Easy regx please help.... stevenjm@olywa.net
    Re: eq and == difference >>Abigail -> You are a LOSER.  (I R A Aggie)
        File Attachment problem with Matt's FormMail (Leo LaBranche)
    Re: HELP! Weird numeric errors <jdw@dev.tivoli.com>
    Re: Help: Problem with Pattern-Matching (Craig Berry)
    Re: Help: Problem with Pattern-Matching <dgris@perrin.dimensional.com>
    Re: help: regular-expression /w multi-lines (Tad McClellan)
        how can i encode data to cgi program? <vega@acer.net>
    Re: How to sort this associative array? <jdw@dev.tivoli.com>
    Re: How to sort this associative array? (Abigail)
        Is Perl5.004 Year 2000 compilant? <jeff_gao@bctel.net>
    Re: Is Perl5.004 Year 2000 compilant? (Michael J Gebis)
        libwww posting parameters lemongrass@my-dejanews.com
    Re: Looking for documentation about DBI/DBD for mysql (Alastair)
    Re: Looking for Perl FAQ Bot (Harry McGreggor)
    Re: Looking for Perl FAQ Bot <zenin@bawdycaste.org>
    Re: Looking for Perl FAQ Bot (Harry McGreggor)
    Re: Perl Docs.. forget the original post (Joseph R. Justice)
    Re: Perl IDE (Larry Hunter)
        perl plea dj_adams8620@my-dejanews.com
        perl5.004_04-m1 <rosenkranz@mathconsult.co.at>
    Re: PerlScript fails to access network resources shineyj@my-dejanews.com
    Re: printf question - newbie (Martien Verbruggen)
    Re: Protecting a data struc with local or my?--More Con (Ronald J Kimball)
    Re: Reading from files (Ronald J Kimball)
    Re: reference to anonymous scalar? (M.J.T. Guy)
    Re: regex question: striphtml and misformed tags (Abigail)
    Re: Secure FTP (John Stanley)
    Re: what is 'sub f () {555};' (Abigail)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Thu, 20 Aug 1998 22:50:00 GMT
From: jhildeb2@my-dejanews.com
Subject: Re: 2 quick questions
Message-Id: <6ri96o$d2u$1@nnrp1.dejanews.com>

This isn't perl related but if you can get a copy of the Windows NT 4.0
Resource Kit I believe that it includes a telnet server.  E-mail me for more
specific information.

Jim Hildebrand


In article <6relfc$jit$1@quartz.inquo.net>,
  "Kris Davey" <mivl@inquo.net> wrote:
> I want to be able to connect from an NT server to an NT Workstation, I don't
> think the Net::Telnet will connect to an NT Workstation. I mean I know that
> I cannot telnet to the boxes myself, so i doubt perl will either.
>
> dave@mag-sol.com wrote in message <6rek19$bo2$1@nnrp1.dejanews.com>...
> >In article <6rdmep$qq$1@quartz.inquo.net>,
> >  "Kris Davey" <mivl@inquo.net> wrote:
> >> 1. I think I remeber seeing something a while back about compiling perl
> >> scripts to an exe. I can't remeber if was a p3exe.bat or an actual
> compiler.
> >> I would like to create scripts that I can run on workstations that don't
> >> have Perl. (These workstations are on an isolated network with no ISAPI
> web
> >> server).
> >
> >An experimental build of the Perl compiler is included with 5.005. It may
> not
> >do what you want tho'.
> >
> >> 2. What would be the best way, if any to create a script that connects
> from
> >> the server to the workstation and runs code on the workstation. i.e.
> copies
> >> new executables down, kills processes, run uninstall, reruns install,
> >> restarts processes. I was looking at sockets but i'm not sure that would
> >> work maybe it's a module that I overlooked. This is between an NT Server
> and
> >> NT Workstations.
> >
> >Have you looked at the module Net::Telnet?
> >
> >hth,
> >
> >Dave...
> >
> >--
> >dave@mag-sol.com
> >London Perl M[ou]ngers: <http://www.mag-sol.com/London.pm/>
> >
> >-----== Posted via Deja News, The Leader in Internet Discussion ==-----
> >http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
>
>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 20 Aug 1998 19:08:30 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: [Q] deprecated use of split (what? why?)
Message-Id: <MPG.104676758fbf25a69897da@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <6rhloc$njc$1@client3.news.psi.net> on 20 Aug 1998 17:18:04 
GMT, Abigail <abigail@fnx.com> says...
( Larry Rosler (lr@hpl.hp.com) wrote on MDCCCXV September MCMXCIII in
( <URL: news:MPG.1045cf7d7c25fe969897d8@nntp.hpl.hp.com>:
( ++ In article <y9izpcz7uff.fsf@mpii02700.mpi-sb.mpg.de> on 20 Aug 1998 
( ++ 13:40:36 +0200, Matthias Fischmann <fis@mpi-sb.mpg.de> says...
( ++ ...
( ++ > The following code should (and actually does) print out a line 
count
( ++ > of the text stored in $s:
( ++ > 
( ++ > > my $s = "foo\nbar\n";
( ++ > > print (scalar (split '\n', $s));
( ++ 
( ++ When what you are counting is the occurrences of single characters, 
the 
( ++ best way is to avoid actually creating an array and counting the 
elements 
( ++ in the array, by using the 'tr' operator:
( ++ 
( ++ print $s =~ tr/\n//;
( 
( You do realize that only happens to return the desired answer because
( the given example ends with a single newline?
( 
(    my $s = "foo\nbar\n";
(    my $t = "foo\nbar\nbaz";
(    my $u = "foo\nbar\n\n\n\n";
( 
(    print scalar (split '\n', $s), ' ', $s =~ tr/\n//, "\n";
(    print scalar (split '\n', $t), ' ', $t =~ tr/\n//, "\n";
(    print scalar (split '\n', $u), ' ', $u =~ tr/\n//, "\n";
( 
( prints
( 
(    2 2
(    3 2
(    2 5

The poster asked for a 'line count', which to most people means the 
number of strings terminated by newlines.  The 'split' throws away empty 
lines, but they are lines nevertheless.

( No to mention it doesn't generalize at all to splitting on something
( else than a single character.

Oh, but I *did* mention it, very clearly:

( ++ When what you are counting is the occurrences of single characters, 
 .
 ..

and I generalized it to show counting (not 'splitting on') a set of 
single characters.

-- 

(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Thu, 20 Aug 1998 17:31:13 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Call another perl script?
Message-Id: <h38ir6.2vl.ln@metronet.com>

8\(F&@ (versace@gianni.com) wrote:
: Hi all,

: I have writen 3 perl cgi scripts for different functions, say a.pl, b.pl
: and c.pl.  Now, I would like to write another perl script to dispatch to
: a.pl, b.pl or c.pl depends on the function passed in. E.g

: if ($function eq "a") {
: 	call a.pl
: } elsif ($function eq "b") {
: 	call b.pl
: } elsif ($function eq "c") {
: 	call c.pl
: }


   perldoc -f system


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 20 Aug 1998 16:33:39 -0700
From: Anthony Perry <aperry@symantec.com>
Subject: Cisco router telnet program
Message-Id: <35DCB252.EA9EC9DA@symantec.com>

All:

Does anyone know of a telnet script out on the 'net that will allow me
to change all my Cisco router's password?  If don't, does anyone have a
working telnet script that I could look at to accomplish the same
result?

Thanks in advance,
Anthony



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

Date: 21 Aug 1998 01:14:27 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Code Style (Was: How to sort this associative array?)
Message-Id: <903662643.854021@thrush.omix.com>

Matt Knecht <hex@voicenet.com> wrote:
    >snip<

    I'd use this:

        for (
            map { $_->[0] }
            sort { $b->[1] <=> $a->[1] } # descending numaric
            map { [ $_, (split (',', $team{$_})[3] ] }
            keys %team
        ) {
            ## Insert nifty code here
        }

    But probably comment a little more, and use foreach my $team.

    >snip<
: I usually run into the following case more often (This is a snippet from
: a script to parse news logs):
    >snip<
: Which also sucks.  Opinions on how to format these constructs, anyone?

    Well, my stab at it:
    
    for (
        sort {
            $spool->{0}->{ng}->{$b}->{count}
            <=>
            $spool->{0}->{ng}->{$a}->{count}
        } keys %{$spool->{0}->{ng}}
    ) {
        printf(
            "\t    %-5s : %s\n",
            commify($spool->{0}->{ng}->{$_}->{count}),
            $_
        );
    }

    But I'd almost never use for() here, instead opting for
    foreach my $foo (@bar) {} style.  Anything that's this
    complex I hate to use $_ on.  I try to only use $_ when
    I'm using code that defaults to it.  As soon as start
    having to type $_ a lot it quickly is self defeating.

    I admit the above isn't too clean either, but with a sort
    that big maybe it would be better in a named sub anyway?

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: 21 Aug 1998 02:28:49 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Code Style (Was: How to sort this associative array?)
Message-Id: <6rim11$ri$1@client3.news.psi.net>

Matt Knecht (hex@voicenet.com) wrote on MDCCCXV September MCMXCIII in
<URL: news:6U%C1.211$b16.1414295@news3.voicenet.com>:
++ 
++ I usually run into the following case more often (This is a snippet from
++ a script to parse news logs):
++ 
++     for (sort
++             {
++                 $spool->{0}->{ng}->{$b}->{count}
++                 <=>
++                 $spool->{0}->{ng}->{$a}->{count}
++             }
++             keys %{$spool->{0}->{ng}}) {
++ 
++         printf "\t    %-5s : %s\n",
++                 commify($spool->{0}->{ng}->{$_}->{count}),
++                 $_;
++     }
++ }
++ 
++ Which also sucks.  Opinions on how to format these constructs, anyone?


Well, if it sucks, it sucks for a certain reason. Find out why you
think it sucks, and avoid it. :)

I would probably write that as:

    # Pretty print newgroup log, in sorted order.
    my $ng = $spool -> {0} -> {ng};
    print map  {sprintf "\t    %-5s : %s\n", commify ($_ -> [1]), $_ -> [0]}
          sort {$b -> [1] <=> $a -> [1]}
          map  {[$_, $ng -> {$_} -> {count}]}  # ST.
          keys %$ng;


Using '$ng = $spool -> {0} -> {ng}' not only makes it more readable,
it saves a lot of hash lookups as well.

The vertical alignment of map/sort/map/keys would be very important
for me.


Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


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

Date: Thu, 20 Aug 1998 17:53:39 -0700
From: news@russo.org (Chris Russo)
Subject: Re: Coderef as hash-index
Message-Id: <news-2008981753390001@buzz.hq.alink.net>

In article <yaazpczit3k.fsf@dromi.ifi.uio.no>, Jan Egil Hagen
<janha@dromi.ifi.uio.no> wrote:

>What's going on? Is this a bug or a feature?

Let's call it "necessary".  I would think that garbage collection would
become a trifle more difficult for Perl if references to arbitrary data
could be stringified.

Regards,

Chris Russo

-- 
Chris Russo
news@russo.org
http://www.russo.org


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

Date: 20 Aug 1998 17:39:46 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <m390kjxj59.fsf@windlord.Stanford.EDU>

David Cantrell <NukeEmUp@ThePentagon.com> writes:

> Just to get started then, words which are common in British English and
> which either have different meanings or aren't used in American English
> ;-)

Your list is a little... er... inaccurate.  You seem to be comparing
uneducated American slang with proper British English.

> almost (merkan 'most', as in merkan 'most all' and british 'amost all')

That's not standard usage in the United States.  If I were writing that,
it would be using it *as* slang, and I'd probably write "'most all" to
indicate that it is slang and that letters were elided.  The proper
expression is "almost all" in the United States as well.

> couldn't (merkan 'could' as in merkan 'could care less' which is just
>           WRONG because they really mean 'don't care at all', as in
>           'could NOT care less')

This is not an American vs. British distinction either.  Both expressions
are slang, and "couldn't care less" is the proper expression in the United
States as well.

> hash (merkan 'pound', meaning the '#' sign)

This varies regionally, particularly among technical writers.

> Currently, use pretty nearly identical vocabularies, but they are
> diverging as the meaning of words changes is different ways.  However,
> our vocabularies are diverging, and we put our sentences together in
> subtlely different ways.

I don't believe this is actually true.

> * - merkan is easier to type than 'american' and corresponds better to
> my pronunciation to boot.

It certainly doesn't correspond better to my pronunciation.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Thu, 20 Aug 1998 17:35:40 +0000
From: Austin Schutz <spamsux-tex@habit.com>
Subject: Re: Delay in bidirectional communication between Perl and C
Message-Id: <35DC5E6C.3092@habit.com>

Rich Sy wrote:
> 
> I'm using IPC::Open2 to create bidirectional communication facility
> between perl and C program.  I've created a simple simulation with perl
> sending strings to the C program which in turn is echoed back.  I
> noticed that there's something wrong with the response received from 
                       ^^^^^^^^^^^^^^^

	That's extremely vague.

the
> C program.
> 
> Below are the programs and the result.  Any ideas appreciated:
> 
> PERL PROGRAM
> #!/usr/bin/perl
> use FileHandle;
> use IPC::Open2;
> print("STARTING PROGRAM");
> STDOUT->autoflush(1);
> &f_print("\nCreating bidirectional channel");
> #$childpid = open2( \*DBREAD, \*DBWRITE, './myc') or die 'Unable to
> open2 -';
> $childpid = open2( \*DBREAD, \*DBWRITE, './myc2') or die 'Unable to
> open2 -';
> DBWRITE->autoflush(1);
> DBREAD->autoflush(1);
> while(1) {
>         print "\nPlease enter a string: ";
>         $line = <STDIN>;
>         break if $line -~ m/quit/i;
>         print "\nWriting to DBWRITE";
>         print DBWRITE $line,"\n" or die "unable to write to Dbwrite -";

	$line already has a newline since you didn't chomp() it. It
looks as if you are printing an extra one to DBWRITE.

>         sleep 1;
>         print "\nReading from DBWRITE";
>         while( $line = <DBREAD> ) {
>                 print "\nRead line is:\n";
>                 print $line,"\n";
>                 last if $line =~ /END/;
>         }
> }
> 
> exit 0;

	HTH,

	Austin


P.S. Here are some extra lines to make my Nazi NNTP Server happy.



































 .


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

Date: Fri, 21 Aug 1998 01:58:05 GMT
From: stevenjm@olywa.net
Subject: Re: Easy regx please help....
Message-Id: <6rik7e$r4d$1@nnrp1.dejanews.com>

In article <6rhvci$1vb$1@nnrp1.dejanews.com>,
  chad@gurucom.net wrote:
> I know this is essy, but i keep screwing it up could someone please give me
> the regx to parse this line.  thanks.
>
> $line = '<a href="http://i.am.stupid.com/index.html">Yes that's me</a>';
>
> this is what I want:
>
> ($link, $title) = ( $line =~ /(?)(?)/; }
>
> -thanks chad
>
Not terribly elegant, perhaps, but one way to do it....

($link, $title) =  $line =~ /^.*?<a\s+href="(.+?)">(.+?)<\/a>.*$/;

And it'll miss a second href on the same line (oh well).  Set down with a good
perl book and figure out what all the puctuation is doing above, it'll help in
the future.

Oh, you'll need to lose the ' in that's or you'll never get your test script
to compile. Use the -w switch too.....

Steve

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 20 Aug 1998 20:42:13 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: eq and == difference >>Abigail -> You are a LOSER. Take that stick out of your ass!
Message-Id: <fl_aggie-2008982042130001@aggie.coaps.fsu.edu>

In article <35d66db3.12245744@enews.newsguy.com>, kermit@sesamestreet.com
(Kermit the frog) wrote:

+ baggage on them. They probably have other things to think about or
+ else they wouldn't be posting the question in the first place.

Maybe they should be reading up on the subject instead? I mean, if you're
learning the syntax of a new language, you should be looking "how do I
declare and use variables?", "what are the control structure, and how are
they used?", and "how do I do loops?". Followed closely with "how do I
preform I/O?".
 
+ GROW UP, ABIGAIL! (or are you already 40 and disgruntled with your
+ life - sounds like it!)

For demanding that someone behave as an adult and do their own work? you
people crack me up...

+ Oh, Peter, now that that is out of the way, == is a numeric
+ comparison, while 'eq' is alphanumeric (string).

So, you're going to be around when he asks "who do both of these
print statements print?"??

$a='123';
if ($a eq '123') {
   print "strings are EQual\n";
}
if ($a == 123) {
   print "numbers are ==ual\n";
}

And you're also going to be around when Peter types his first 'elseif',
too?

My advice to this Peter-person is thus: read the docs germane to the
problem at hand. Learn to use the on-line doc set, and learn how to 
search that with the tools available to you. Often times, you'll find
the answer *faster* and more *accurately* than if you post on Usenet.
But the Blue Camel, it comes with an index, and you can take it with
you. Actually, at your level, you'd be better served with the Blue Llama 
(or perhaps the Blue Gecko) book, and if you stick with perl, the Blue Camel.

Who's to say that you'll *always* have an internet connection? Usenet
should be your *last* choice in gaining knowledge. There are more, better
sources of information.

Driving to your favorite bookstore and browsing in their coffee shop
may be faster... :)

James


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

Date: 21 Aug 1998 00:49:06 GMT
From: freezerburn@nwu.edu (Leo LaBranche)
Subject: File Attachment problem with Matt's FormMail
Message-Id: <freezerburn-2808561932160001@phx-41.treknet.net>

Hello,

I am making an entry page for a Logo Contest and I need to have the people
submit their images via a form. I need the files to appear as attachments
in my email client (eudora pro). I am using Matt's FormMail.cgi, and
everything works great except for the file attachments. 

As far as I know, you must include ENCTYPE="multipart/form-data" in the
FORM tag in order for <INPUT TYPE="file"> to work correctly, but any time
you include that ENCTYPE, Matt's FormMail refuses to work (as well as
about 7 other premade scripts I've tried). 

Is there a way to either avoid using that specific ENCTYPE for attached
image files or change something in the script to allow for the "multipart"
form data?

I have tried using many other form processing scripts and none of them
work when that ENCTYPE is set. I NEED HELP!!!

Please reply via Email as it takes for ever for my modem to load all the
messages in this group.


Thank you,

Leo LaBranche <freezerburn@nwu.edu>


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

Date: 20 Aug 1998 16:27:31 -0500
From: "Jim Woodgate" <jdw@dev.tivoli.com>
Subject: Re: HELP! Weird numeric errors
Message-Id: <obr9ybibss.fsf@alder.dev.tivoli.com>


harry@dublin.net (Harry McGreggor) writes:
> $test = printf("%.0f\n",$number);
> 
> print TEST $test;

> - why is it 1? It should be 1234567891!

damn perl, always doing what you tell it, not what you want... :)

printf returned 1, you want sprintf which returns a formatted
string...

-- 
Jim Woodgate 
Tivoli Systems
E-Mail: jdw@dev.tivoli.com


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

Date: 21 Aug 1998 00:09:57 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Help: Problem with Pattern-Matching
Message-Id: <6ridsl$3ap$1@marina.cinenet.net>

setro@my-dejanews.com wrote:
: In a perl-script (packing Mail to a pager)
: I want to change a string!
: 
: All words should start with a big letter,
: all ofther letters of the Words should be small.
: And I want to delete all space.
: 
: So I try to make all letters small: tr/[A-Z]/[a-z]/  that's no problem

Though you're turning '[' into '[' and ']' into ']' for no clear reason.
Also, lc is often easier to use, and it respects locales.

: Now
: make all first letters big (=letters after a space and the first in string)

Using your exact definition:

  $string =~ s/((?:^| )\w)/\U$1/g;

Using a more general definition:

  $string =~ s/\b(\w)/\u$1/g;

: Than delete all spaces: s/ //g that's no problem

Though tr/ //d is more efficient.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


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

Date: Fri, 21 Aug 1998 02:50:30 GMT
From: Daniel Grisinger <dgris@perrin.dimensional.com>
Subject: Re: Help: Problem with Pattern-Matching
Message-Id: <6rimg6$1er$1@rand.dimensional.com>

[posted to comp.lang.perl.misc and mailed to the cited author]

In article <6rhjgo$jqq$1@nnrp1.dejanews.com>
setro@my-dejanews.com wrote:

>Example: "Many greetings to Petra and Sebastian!"
>result:  "ManyGreetingsToPetraAndSebastian!"

$string = 'Many greetings to Petra and Sebastion!';
$string = join '', map { ucfirst(lc) } split / /, $string;

dgris
-- 
Daniel Grisinger           dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
                           Dave Clark


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

Date: Thu, 20 Aug 1998 17:41:50 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: help: regular-expression /w multi-lines
Message-Id: <en8ir6.o3m.ln@metronet.com>

GEMINI (dennis@info4.csie.nctu.edu.tw) wrote:
: I have a string with multiple lines like follows:

: line1
: line2
: =========
: 1. first
: 2. second
: 3. third
: =========
: line3
: line4


: now I'd like to extract the lines between the "=========" lines,
: and then split it into a list by the newline character:


: however, the regular expression doesn't work because the (.*)
: doesn't match the newline character.
: so how should I write the expression correctly?


   @list = split /\n/, $1 if /=========\n((?:.*\n)+)=========\n/;


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Fri, 21 Aug 1998 09:53:52 +0800
From: "vega" <vega@acer.net>
Subject: how can i encode data to cgi program?
Message-Id: <6rijsu$4v0@netnews.hinet.net>

as title:
i write a porgram ,and it must communicate with cgi program,
so how can i encode my input data to cgi program?
thanks a lot!




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

Date: 20 Aug 1998 16:21:05 -0500
From: "Jim Woodgate" <jdw@dev.tivoli.com>
Subject: Re: How to sort this associative array?
Message-Id: <obsoiric3i.fsf@alder.dev.tivoli.com>


Robert Walker - Lucent ASCC <rfwalker@lucent.com> writes:
> My current method it to create another array
> that would just contain the key and value of interest.
>  
> @tmp{"A", "B", "C", "D"} = (0.67, 0.2, 0.25, 0.87)
  
that's not so bad (better performance-wise than the "simple case" of
putting a split in a sort subroutine), it can be done in a one liner.
I don't know if it's an faq or not, but the following web page has
exactly what you're looking for (and then some :)

http://www.perl.com/CPAN-local/doc/FMTEYEWTK/sort.html

-- 
Jim Woodgate 
Tivoli Systems
E-Mail: jdw@dev.tivoli.com


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

Date: 21 Aug 1998 02:09:13 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: How to sort this associative array?
Message-Id: <6riks9$kb$1@client3.news.psi.net>

Robert Walker - Lucent ASCC (rfwalker@lucent.com) wrote on MDCCCXV
September MCMXCIII in <URL: news:35DC6A60.2443@lucent.com>:
++ Hello, I have a question, how can I sort an
++ associative array that looks like this.
++ 
++ 
++ My current method it to create another array
++ that would just contain the key and value of interest.
++  
++ @tmp{"A", "B", "C", "D"} = (0.67, 0.2, 0.25, 0.87)
++ 
++ then sort this array on the values, then I have the array sorted
++ 
++ but maybe there is away to do this w/o a tmp array?


That is not a bad way, but you've still the overhead of indexing
a hash. You might want to read the FAQ on sorting hashes by keys
and sorting arrays by anything.



Abigail
-- 
perl -weprint\<\<EOT\; -eJust -eanother -ePerl -eHacker -eEOT


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

Date: Wed, 19 Aug 1998 15:59:14 -0700
From: Jeff Gao <jeff_gao@bctel.net>
Subject: Is Perl5.004 Year 2000 compilant?
Message-Id: <35DB58C1.53FBD166@bctel.net>

Does anybody know that whether perl 5.004 is y2k compilant?

Thanks


--
Jeff Gao




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

Date: 21 Aug 1998 00:55:18 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Is Perl5.004 Year 2000 compilant?
Message-Id: <6righm$5vs@mozo.cc.purdue.edu>

Jeff Gao <jeff_gao@bctel.net> writes:

}Does anybody know that whether perl 5.004 is y2k compilant?

Yes.  In fact, you are the 2000th person to ask this question.
comp.lang.perl.misc is not faq2k compliant, so you had better get to
www.perl.com to find the answer.

-- 
Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net


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

Date: Fri, 21 Aug 1998 00:53:25 GMT
From: lemongrass@my-dejanews.com
Subject: libwww posting parameters
Message-Id: <6rige5$m6g$1@nnrp1.dejanews.com>

Hi.Can someone describe what type of data structure
is use for the parameter of the HTTP::Request::Common
Post command of the libwww module?
the format given in the libwww cookbook for the last
parameter is:   [ search => 'www', errors => 0]
What I would like to do is pass the form data input
to the cgi program directly to another site. How can
I convert the %input hash to the proper data structure?
Thanks.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 20 Aug 1998 23:02:22 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Looking for documentation about DBI/DBD for mysql
Message-Id: <slrn6tpedo.53.alastair@calliope.demon.co.uk>

Louis Banens <louis.banens@tip.nl> wrote:
>Hi,
>
>Can anybody point me to some documentation about DBI/DBD for mysql.

http://www.hermetica.com/technologia/DBI
http://www.tcx.se/
http://mysql.turbolift.com/mysql/


-- 

Alastair
work  : alastair@psoft.co.uk
home  : alastair@calliope.demon.co.uk


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

Date: Fri, 21 Aug 1998 02:58:59 GMT
From: harry@dublin.net (Harry McGreggor)
Subject: Re: Looking for Perl FAQ Bot
Message-Id: <35dce1c4.85949550@news.netcom.ca>

Hi Josh!

>If you mean, a "bot" that answers questions from the perl faq, then this
>ugly little turd might get you started; you'd probably end up coupling
>it with some CGI code.
>
>#!/usr/local/bin/perl -w
>use strict;
>
>my $target = shift;
>my $opt = shift;
>if (defined($opt)) {
>	@ARGV = </usr/local/lib/perl5/pod/perlfaq*.pod>;
>} else {
>	@ARGV = </usr/local/lib/perl5/pod/*.pod>;
>}
>
>while (<>) {
>	print substr(substr($ARGV, rindex($ARGV, '/') + 1), 0, -4), ": $_" if /$target/;
>}

Thanks for the demonstration code. It's just what I needed

Cheers,


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

Date: 21 Aug 1998 01:16:15 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Looking for Perl FAQ Bot
Message-Id: <903662751.506034@thrush.omix.com>

Harry McGreggor <harry@dublin.net> wrote:
: I'm looking for a Perl FAQ Bot which spits out entrys in a given FAQ
: according to the users input. Do any such programs exist?

        This month's Perl Journal has a nice article on InfoBots that
        you might find useful.  They are pretty close to what you describe
        above.  www.tpj.com

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Fri, 21 Aug 1998 06:19:15 GMT
From: harry@dublin.net (Harry McGreggor)
Subject: Re: Looking for Perl FAQ Bot
Message-Id: <35dd114e.7444330@news.netcom.ca>

Hello,

>        This month's Perl Journal has a nice article on InfoBots that
>        you might find useful.  They are pretty close to what you describe
>        above.  www.tpj.com

Perfect, just what I'm looking for.

Thanks for the tip,



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

Date: 20 Aug 1998 20:19:19 -0400
From: jrj@access.this-is.a-false.address  (Joseph R. Justice)
Subject: Re: Perl Docs.. forget the original post
Message-Id: <6riee7$grm@access2.digex.net>

[Boilerplate warning: The From: address displayed is deliberately
corrupted in an attempt to foil spammers.  My correct e-mail address
has (at the end) "access.digex.net", begins with "jrj", and has an
at-sign in the middle.  Thanks.  -- J]

[Boilerplate warning: NOTICE!  My reading of Usenet newsgroups is
*sporadic* and random in the extreme!  Therefore, if you post a
response here to this article, I may *not* see it!  If you want to
make sure I see your response, please CC me via e-mail with it, and
indicate within it that it has been both posted and e-mailed to me.
Thanks.  -- J]


[P (and M to Charles Maier).  -- J]



According to Charles Maier  <maierc@chesco.com>:

[snip -- talking about perceived insufficiencies in the current
existing documentation that comes bundled with perl.  -- J]

> Personally.. I have kluged-up a set of docs for Perl.. including
> gathering information from this group and appended/linked it to
> various parts of the docs. Doing this for myself has only enforced
> the realization that Perl's docs/FAQs have a lot of room for
> improvment. It also showed me how futile it was.. when I upgrade a
> perl rev..... I may have to do it all over again.

Question.  Have you made (or can you make) your most recent set of
"kluged-up set of docs for Perl" available to the world, via anon FTP,
a web page, etc?  I for one would like to see what kinds of things you
added; there might very well be ideas in there in the stuff you added
I might find useful.  I expect there are others who'd feel the same.

Thanks for any info you can provide, and for your time.  Be well.

Joseph

-- 
	  Joseph R. Justice  ==  jrj, at access.digex.net ==
     an69616, at anon.penet.fi == anon-16439, at anon.twwells.com
 (EFNet) IRC: jrj, jrjx, jrjxx      http://www.access.digex.net/~jrj
 I have a job!  Now if I can keep it...  Next up, the *Personal Ad*!


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

Date: 21 Aug 1998 01:19:03 GMT
From: lhunter@acm.org (Larry Hunter)
Subject: Re: Perl IDE
Message-Id: <6rihu7$4e4$1@hiram.io.com>

>Does anyone know of any IDEs for Perl?

There is one on the market now, Perl Builder from SolutionSoft
www.solutionsoft.com . See a review linked from the front page
of www.perl.com . The editor and debugging support are nice, but
the CGI development things are pre-CGI.pm. And it is very expensive.

As an alternative try some of the Perl editors you can find by
searching for "editors" from the www.perl.com page. 
------------------------------------------------------------------------
Larry Hunter         lhunter@acm.org         http://www.io.com/~lhunter/



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

Date: Fri, 21 Aug 1998 02:03:07 GMT
From: dj_adams8620@my-dejanews.com
Subject: perl plea
Message-Id: <6rikgr$raq$1@nnrp1.dejanews.com>

I am having a problem with a certain subroutine I have written in a Perl
script, presumably related to a syntax error that I can't find. When executed
as a CGI in a browser, the browser returns the "500 Internal Server Error"
indicating that there is a problem with the script.

When I run it over telnet, it prints out the html fine but it goes to the
wrong subroutine because there is no way to attach through telnet the FORM
values that the script normally collects through a form on an html page.
Basically, I can't use telnet to find out what is wrong with it. Alas, I also
have but a commercial web hosting account, so I can not examine the server
error log.

Its almost 3am here now and I've been trying to get this script working for
several hours. It actually edits the page that it is supposed to, but then
returns the 500 message. You can tell that it has edited the page as it is
meant to by visiting the page and checking it.

Anyway, I have checked my syntax, my ISP refuses to help me with Perl/CGI
issues, and I have even tried comparing all my syntax to the Camel book, all
to no avail. I have reached the stage where I am reduced to begging for some
kind- hearted soul to point out to me the errors of my ways. I have included
the suspect subroutine below in the hope that somebody will point out a
glaring error that is the reason for my troubles!

I have checked and double-checked all the variables (such as $path) and they
are fine, so, please help.....

Dan Adams
dan@fearsome.net

sub build {

chmod 0777, '$page'; # chmod on file
open(PAGE, "$page") || die "I can't open that file\n";
	@lines = <PAGE>;
	close(PAGE);
	$sizelines = @lines;

open(PAGE, ">$page") || die "I can't create that file\n";
		for ($a = 0; $a <= $sizelines; $a++) {
		$_ = $lines[$a];
 	if (/<!--begin-->/) {
	    print PAGE "<tr><td width=\"100%\" colspan=\"2\" bgcolor=\"C0C0C0\"
bordercolor=\"FFFFFF\" bordercolorlight=\"FFFFFF\" bordercolordark=
\"FFFFFF\"><small><font face=\"Arial\"><strong>[$subject]</strong> - <strong>
[<a href=\"mailto:$email\">$usrname</a>]</strong> - <strong>
$time</strong></font></small></td></tr>\n";
		print PAGE "<tr><td width=\"100%\" colspan=\"2\"><small><font
face=\"Arial\">[$comments]</font></small></td></tr><tr><td width=\"100%
\">&nbsp; </td></tr>\n";
		print PAGE "<!--begin-->\n";
		} else {
			print PAGE $_;
		}
	}
close(PAGE);

print "Content-type: text/html\n\n";
print "<html><head><title>thanks</title></head>\n";
print "<body>\n";
print "Your comment was added to $html_page successfully, and you will receive
an e-mail confirming this!\n";
print "Please click <a href=\"http://domain.com/directory/
$path/board\.htm\">here</a> to return to the message board.\n";
print "Thanks for your parcipitation!\n";
print "</body></html>\n";

open(MAIL, "| $sendmail -t") || die "I can't open sendmail\n";
  print MAIL "To: $usrname <$email>\n";
  print MAIL "From: domain BBS <$myemail>\n";
  print MAIL "Subject: your comment on the webboard\n";
  print MAIL "Thank you for your recent entry on the BBS\n";
  print MAIL "Your entry can be viewed at the following URL:\n";
  print MAIL "\n";
  print MAIL "$html_page\n";
  print MAIL "\n";
  print MAIL "You may need to refresh the page in your browser in order to see
the change\n";
  print MAIL "If you need assistance, please contact $myemail\n";
close(MAIL);

open(MAIL, "| $sendmail -t") || die "I can't open sendmail\n";
    print MAIL "To: $myemail\n";
    print MAIL "From: domain BBS <$myemail>\n";
    print MAIL "Subject: new article comment\n";
    print MAIL "$usrname added a comment to $html_page:\n";
    print MAIL "\n";
close(MAIL);
exit;
}

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 20 Aug 1998 17:13:25 +0200
From: "Dipl.-Ing. Markus Rosenkranz" <rosenkranz@mathconsult.co.at>
Subject: perl5.004_04-m1
Message-Id: <35DC3D15.41C6@mathconsult.co.at>

Hi.

Last week I downloaded perl5.004_04-m1.tar.gz from CPAN (from some
German server), my first time installing Perl.  I wasted some hours
trying to get it compiled on my DEC Alpha with Digital Unix 4.0D.
A friend of mine who has installed Perl successfully on the same
platform told me that he has used perl5.004_04.tar.gz.  I downloaded
that one, and it worked immediately.  Fine.

But can anyone tell me what the -m1 means.  I do not want to make the
same mistake again - never download something you are not completely
sure about!  (I though the "m" could mean "maintained version".)  The
problem is that CPAN is indeed very comprehensive as its name suggests.
But I just could not figure out what all those version identifiers
stand for.  They do explain what the tar and gz extensions mean.  Did
I miss some useful documentation page?  Or did they forget to add one?
--- MR


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

Date: Fri, 21 Aug 1998 01:48:10 GMT
From: shineyj@my-dejanews.com
Subject: Re: PerlScript fails to access network resources
Message-Id: <6rijkr$q84$1@nnrp1.dejanews.com>

I'm having the opposite problem. I would like to get a directory listing from
a network machine [\\my_net_machine\directory] but it works over the
commandline but not thru a web page under the cgi-bin.

As to the access denied problem, have you tried using 'net use \\server\c$' to
log onto the server first?

Shiney Joseph
In article <6qv01d$vdc$1@nnrp1.dejanews.com>,
  jpeng@rocketmail.com wrote:
> I am using IIS 3.0 and PerlScript 316 on a NT 4.0 SP3 box. The script tries to
> execute "dir \\remote_server\c$" and receives "access is denied". In the same
> script, I can use VBscript to create a file in \\remote_server\c$. Does anyone
> know how I can get around it? BTW, cgi version of the same script is working
> fine though.
>
> Jack
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
>


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 21 Aug 1998 02:38:01 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: printf question - newbie
Message-Id: <6rimi9$nms$1@nswpull.telstra.net>

In article <6renvr$h2q$1@nnrp1.dejanews.com>,
	horseyride@hotmail.com writes:
> Whats the proper way to replace the leading spaces from the %10s with leading
> zeroes?
> 
> printf log2 "%10s","$count";

%s formats a string. Leading zeroes make no sense in a string. If you want to print a number, tell printf so:

printf "%010d", $count;

> I read the FAQ. I read the FM. Maybe I'm just dumb.

# perldoc -f printf

doesn't really tell you much (5.004_04). It does however tell you that
printf is equivalent to 'print FILEHANDLE sprintf(FORMAT, LIST)'. This
should tell you that maybe you should have a look at the sprintf man
page:

# perldoc -f sprintf

And behold: many explanations.

Martien
-- 
Martien Verbruggen                      |
Webmaster www.tradingpost.com.au        | "In a world without fences,
Commercial Dynamics Pty. Ltd.           |  who needs Gates?"
NSW, Australia                          |


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

Date: Thu, 20 Aug 1998 22:05:33 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Protecting a data struc with local or my?--More Confusion
Message-Id: <1de2vd5.9dqvk51p2oqv6N@bay1-279.quincy.ziplink.net>

Craig Berry <cberry@cinenet.net> wrote:

> Rick Delaney (rick.delaney@shaw.wave.ca) wrote:
> : Unfortunately 'exists' will also allow references to spring into
> : existence with some flavours of perl (5.004_04).  For example:
> [example snipped]
> 
> Not so, you're bringing the intermediate-level key into existence in your
> 
> :             print "$y\n" if exists($ref->{$x}{$y});
> 
> line in the test function.  (Had me worried there for a minute, though...)

That's the problem.  As Rick said, 'exists' allows references to spring
into existence.

If $ref->{$x} does not exist, should Perl immediately return false, or
should it first create $ref->{$x}, and then return false when it finds
that $ref->{$x}{$y} does not exist?

It appears that some people expect the former behavior.  :-)

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Thu, 20 Aug 1998 22:05:36 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Reading from files
Message-Id: <1de2vj0.1skiare1qhwqwhN@bay1-279.quincy.ziplink.net>

I.J. Garlick <ijg@csc.liv.ac.uk> wrote:

> close FH; # should have a die/error report here as well

For some reason, this line of code strikes me as very amusing...
Taken to extremes:

#!/usr/local/bin/perl -- # should use -w here

# should use strict here

# should iterate over input here
#    should process current input block here

# should print results here

# should exit here

# should define various subroutines here


;-)

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 20 Aug 1998 23:31:13 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: reference to anonymous scalar?
Message-Id: <6ribk1$alp$1@pegasus.csx.cam.ac.uk>

In article <35DAEDF5.76CF@min.net>, John Porter  <jdporter@min.net> wrote:
>M.J.T. Guy wrote:
>> 
>>      $scalarref = \[ 'my_value' ]->[0];
>
>"PAY NO ATTENTION TO THE MAN BEHIND THE CURTAIN!"

Thank you for reminding me.   I should also have said that if you don't
want the scalar initialised, you can increase the Obfuscation Quotient
by writing

             \[]->[0]

And of course, if you want a truly alphanumeric-free script, use instead

             \{}->{''}


Mike Guy


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

Date: 21 Aug 1998 02:54:46 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: regex question: striphtml and misformed tags
Message-Id: <6rinhm$10a$1@client3.news.psi.net>

patrick@cre8tivegroup.com (patrick@cre8tivegroup.com) wrote on MDCCCXV
September MCMXCIII in <URL: news:6ri0ti$3jh$1@nnrp1.dejanews.com>:
++ I'm trying to master regexes.  I've been using the Irregular Expressions post
++ and the striphtml script from Tom C as a basis.  I've run into a problem
++ though with the HTML tags section, however, which I don't understand.  It
++ deals with misformed tags.  Tags such as <IMG SRC="blah.gif" WIDTH=150"
++ HEIGHT="10">.  The missing double quote causes perl to go to 100% CPU usage
++ and ties up the resources on my system.
++ 
++ In Tom's Code:
++   s{ <                    # opening angle bracket
++ 
++     (?:                 # Non-backreffing grouping paren
++          [^>'"] *       # 0 or more things that are neither > nor ' nor "
++             |           #    or else
++          ".*?"          # a section between double quotes (stingy match)
++             |           #    or else
++          '.*?'          # a section between single quotes (stingy match)
++     ) +                 # repetire ad libitum
++                         #  hm.... are null tags <> legal? XXX
++    >                    # closing angle bracket
++ }{}gsx;                 # mutate into nada, nothing, and niente
++ 
++ The problem is the [^>'"] * portion of the code.  If I remove the ", it works
++ fine.  Why is this?  This works fine so long as there is 2 or more double
++ quotes in the tag.  If there is only one, it won't remove that tag.
++ 
++ More importantly, why does the bad tag cause a runaway process?  Shouldn't it
++ just die?

No. It's just that Perl tries deparately to satisfy the regex. And the 
regex doesn't give Perl hints on failures. The culprits are the
".*?" and '.*?' parts. ".*?" does *not* mean "match a double until
the next double quote". It means "match a double quote, then arbitrary
text, then a double quote, and minimize the length of the text such that
the *ENTIRE REGEX STILL SUCCEEDS*".

So, in your case, after the RE machines hobbles to the " after the
WIDTH=150, it will first use the next " to pair, then continue. 10 matches
the [^>'"] *, then it gets another ". This will be first paired with
the next ", etc. Eventually, you run out of "'s when hitting the end
of the string, and the regex still hasn't matched. So, the RE machine
backs up, and it will pair the third " from the end with the last one.
That fails. So, it backs up another ", matching it with the next, etc.
This is basically exponential in the number of "'s. If you try to apply
the above regex to a normal HTML file, and there's a mistake like yours
not far from the end, it'll take eons before Perl decides the regex
doesn't match.

The regex is far better written as:

s{<                    # opening angle bracket
   (?:                 # Non-backreffing grouping paren
        [^>'"] +       # 1 or more things that are neither > nor ' nor ";
                       # this keeps -w happy.
           |           #    or else
        "[^"]*"        # a section between double quotes
           |           #    or else
        '[^']*'        # a section between single quotes
   ) *                 # repetire ad libitum. (* so we match <>)
  >                    # closing angle bracket
}{}gsx;                # mutate into nada, nothing, and niente



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


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

Date: 20 Aug 1998 23:43:05 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Secure FTP
Message-Id: <6rica9$fud$1@news.NERO.NET>

In article <35DCA31C.B7E78EBF@medianet-usa.com>,
Yves BAILLY  <yves@medianet-usa.com> wrote:
>This is a multi-part message in MIME format.

Ick. Poo. 

>Here's a (big) Perl script, to be used to handle FTP
>problems : each file to be send is put in a waiting
>queue, and the script tries to send it when he can.
>
>I'm just a newbies in Perl programming, so if someone
>could have a look at my script and give me his
>feeling...

967 lines of perl code. Hmmmm. 

uucp filename dest\!ination

A long time ago I looked as solving the problem of moving files around
automatically, and just could not get past the fact that someone had
already solved the problem better than I ever could.



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

Date: 21 Aug 1998 02:57:18 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: what is 'sub f () {555};'
Message-Id: <6rinme$10a$2@client3.news.psi.net>

Josh Kortbein (kortbein@iastate.edu) wrote on MDCCCXV September MCMXCIII
in <URL: news:6rhvkr$bvv$6@news.iastate.edu>:
++ Steven Smith (steves@wco.com) wrote:
++ : I'm trying to understand a lib we pulled off of the net.  I've never
++ : seen this before.
++ : what would a sub declaration like this do??
++ 
++ : sub f () {555};
++ 
++ Have you tried it?
++ 
++ It looks to me like it returns 555, regardless of the argument
++ provided - which leads me to believe that it's either (a) useless,
++ or (b) capable of doing something else that I don't see. AFAIK,
++ though, it just returns 555.


I guess you find

# define f 555

in C code useless as well?



Abigail
-- 
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 3497
**************************************

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