[10805] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4406 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Dec 11 17:07:14 1998

Date: Fri, 11 Dec 98 14:00:30 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 11 Dec 1998     Volume: 8 Number: 4406

Today's topics:
        A push in the right direction - Perl :c) <tcarter@tiac.net>
    Re: A push in the right direction - Perl :c) <matt@pcr7.pcr.com>
        CGI.pm vs. old way I'm used to? <stepherd@gusun.georgetown.edu>
    Re: foo bar (Martin Vorlaender)
    Re: Help on s/// !!! <uri@ibnets.com>
    Re: how check string whether numeric value? <baliga@synopsys.com>
    Re: How to read a binary file in Perl? How to install m (Erik)
        IRIX 6.2 -> 6.5 problem with GDBM and 5.005_02? <ryanmd@mh.us.sbphrd.com>
    Re: Learning Perl, 2nd edition, exercise 7.1b <nospam@nospam.com>
    Re: PELRSHOP - not recognising SSI <robc@AmericanMeter.com>
        Perl and Zip (Barry Eimer)
    Re: Perl and Zip <matt@pcr7.pcr.com>
    Re: Perl and Zip <matt@pcr7.pcr.com>
    Re: specify password in a ftp URL? <mbehr@web-enrichment.com>
        Splitting a string at a certain point <kenny@weng.dk>
        STANDARD PERL for WIN 95/NT EXECUTABLE (Johannes Poehlmann)
    Re: Use script to send Standard Form Input? <marst96@pitt.edu>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Fri, 11 Dec 1998 16:03:22 -0500
From: "Tommie N. Carter" <tcarter@tiac.net>
Subject: A push in the right direction - Perl :c)
Message-Id: <3671889A.E3BDEADD@tiac.net>

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi all,
<br>I'm new to perl and I've read through many of the messages so I hope
I'm not treading water here.&nbsp; I want to create a perl script admin
tool that let's me issue system calls using a form and passing the results
of my system calls back to the web page.&nbsp; The overall result is to
create a simulated shell using my browser.&nbsp; I'm hopeful I'll be able
to use this as an administrative tool to access my http web site...
<p>Thanks in advance for all your help.
<p>Tom Carter
<br>retract@netscape.net
<br>&nbsp;
<br>&nbsp;</html>



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

Date: Fri, 11 Dec 1998 16:40:34 -0500
From: "Matt Heusser" <matt@pcr7.pcr.com>
Subject: Re: A push in the right direction - Perl :c)
Message-Id: <vdgc2.73$8z.1117@news3.ispnews.com>

This is a multi-part message in MIME format.

------=_NextPart_000_00E5_01BE2524.F95B1960
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

>...I want to create a perl script admin tool that let's me=20
>issue system calls using a form and passing the results=20
>of my system calls back to the web page.   The overall=20
>result is to create a simulated shell using my browser.=20
>  I'm hopeful I'll be able to use this as an administrative tool to=20
>access my http web site...=20
=20
  Actually doing this is very, very easy, and will be outlined below.
But first - ARE YOU REALLY, REALLY sure you want to do this?
This allows ANYONE to code whatever they want.  What If I type in:
  rm *
=20
 ??  There goes your data.
=20
  If you have a firewall up, and you only give out the URL to people
you trust, etc., it might not be that bad.  But, from a system=20
security persepective, this is reallly dumb.  At the very least, joe
user can do "ls" and "cd" to his hearts content, and figure out
anything he wants to know about your system.
=20
  At the very least, talk to a couple of people who have done
system security, and put a password onto it! =20
=20
  But, if you talk to a few people, read a few good books, and
in the end decide to put your page up, here's how to do it:
=20
  Basically, you just have your HTML gather information in a=20
field, and, when a button is clicked, post what was in that=20
field to a  perl script and say something along the lines of:
 ?command=3D"whatever.shell"
=20
Then, your perl looks like this:
=20
 use CGI;
 $query =3D new CGI;
 $command =3D $query->param('command');
 system($command);
=20


---> If you want help, advise, whatever, feel free
to drop me an e-mail.
=20
hope that helps,


Matt H.
Matt@pcr7.pcr.com
 =20

------=_NextPart_000_00E5_01BE2524.F95B1960
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!doctype html public "-//w3c//dtd html 4.0 =
transitional//en">
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV>&gt;...I want to create a perl script admin tool that let's me =
</DIV>
<DIV>&gt;issue system calls using a form and passing the results </DIV>
<DIV>&gt;of my system calls back to the web page.&nbsp;&nbsp; The =
overall </DIV>
<DIV>&gt;result is to create a simulated shell using my =
browser.&nbsp;</DIV>
<DIV>&gt;&nbsp; I'm hopeful I'll be able to use this as an =
administrative tool=20
to </DIV>
<DIV>&gt;access my http web site... </DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp; Actually doing this is very, =
very easy,=20
and will be outlined below.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>But first - ARE YOU REALLY, REALLY =
sure you want=20
to do this?</FONT></DIV>
<DIV><FONT size=3D2>This allows ANYONE to code whatever they want.&nbsp; =
What If I=20
type in:</FONT></DIV>
<DIV><FONT size=3D2>&nbsp; rm *</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp;??&nbsp; There goes your data.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp; If you have a firewall up, and you only give =
out the=20
URL to people</FONT></DIV>
<DIV><FONT size=3D2>you trust, etc., it might not be that bad.&nbsp; =
But, from a=20
system </FONT></DIV>
<DIV><FONT size=3D2>security persepective, this is reallly dumb.&nbsp; =
At the very=20
least, joe</FONT></DIV>
<DIV><FONT size=3D2>user can do &quot;ls&quot; and &quot;cd&quot; to his =
hearts=20
content, and figure out</FONT></DIV>
<DIV><FONT size=3D2>anything he wants to know about your =
system.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp; At the very least, talk to a couple of people =
who have=20
done</FONT></DIV>
<DIV><FONT size=3D2>system security, and put a password onto it!&nbsp;=20
</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp; But, if you talk to a few people, read a few =
good=20
books, and</FONT></DIV>
<DIV><FONT size=3D2>in the end decide to put your page up, here's how to =
do=20
it:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp; Basically, you just have your HTML gather =
</FONT><FONT=20
size=3D2>information in a </FONT></DIV>
<DIV><FONT size=3D2>field, and, when a button is clicked, post what =
</FONT><FONT=20
size=3D2>was in that </FONT></DIV>
<DIV><FONT size=3D2>field to a&nbsp; </FONT><FONT size=3D2>perl script =
and say=20
something along the </FONT><FONT size=3D2>lines of:</FONT></DIV>
<DIV><FONT =
size=3D2>&nbsp;?command=3D&quot;whatever.shell&quot;</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Then, your perl looks like this:</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;use CGI;</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;$query =3D new CGI;</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;$command =3D =
$query-&gt;param('command');</FONT></DIV>
<DIV><FONT size=3D2></FONT><FONT color=3D#000000=20
size=3D2>&nbsp;system($command);</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>---&gt; If you want help, advise, =
whatever, feel=20
free</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT><FONT size=3D2>to drop me an=20
e-mail.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>hope that helps,</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Matt H.</FONT></DIV>
<DIV><FONT size=3D2><A=20
href=3D"mailto:Matt@pcr7.pcr.com">Matt@pcr7.pcr.com</A></FONT></DIV>
<DIV><FONT size=3D2>&nbsp; </FONT></DIV></DIV></BODY></HTML>

------=_NextPart_000_00E5_01BE2524.F95B1960--



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

Date: Fri, 11 Dec 1998 16:53:32 -0500
From: Dave Stephens <stepherd@gusun.georgetown.edu>
Subject: CGI.pm vs. old way I'm used to?
Message-Id: <3671945C.D164FB9D@gusun.georgetown.edu>

Hey,

I've been coding perl cgi using the following subroutine to parse form
contents
for years:

sub parse_form {

   read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

   @pairs = split(/&/, $buffer);

   foreach $pair (@pairs) {
      ($name, $value) = split(/=/, $pair);

      $value =~ tr/+/ /;
      $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
      $value =~ s/<!--(.|\n)*-->//g;

      $in{$name} = $value;
   }

}

BUT, I see everyone referring to CGI.PM as the greatest thing ever. So
I'm
wondering, what am I missing?  Anyone give me some pointers on why
this module is superior to the way I've doing it?

Thanks,

Dave Stephens
stepherd@gusun.georgetown.edu



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

Date: Fri, 11 Dec 1998 21:30:16 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: foo bar
Message-Id: <367180d8.524144494f47414741@radiogaga.harz.de>

Tony Curtis (Tony.Curtis+usenet@vcpc.univie.ac.at) wrote:
: Re: foo bar, Todd <tbsmith@viper.net> said:
: Todd> where's this foo-bar stuff come from? I heard
: Todd> it in that "Search for Private Ryan"
:                  (Saving Private Ryan)
: See e.g.
:
:     http://www.comedia.com/hot/jargon_3.0/JARGON_F/FOOBAR.HTML

Just to complete this: The current version of the Jargon file is 4.0;
the official site is http://locke.ccil.org/jargon/

cu,
  Martin
--
                        | Martin Vorlaender | VMS & WNT programmer
 VMS is today what      | work: mv@pdv-systeme.de
 Microsoft wants        |       http://www.pdv-systeme.de/users/martinv/
 Windows NT 8.0 to be!  | home: martin@radiogaga.harz.de


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

Date: 11 Dec 1998 16:07:12 -0500
From: Uri Guttman <uri@ibnets.com>
To: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: Help on s/// !!!
Message-Id: <39soemmlq7.fsf@ibnets.com>

>>>>> "TS" == Tk Soh <r28629@email.sps.mot.com> writes:

  TS> $line=~s/(?<=<!--increment here-->)(\d+)/$1+1/e;

  TS> The (?<=...) is a zero-width lookbehind expression. I personally
  TS> feel it makes the rhs of s/// look cleaner.


it is very slow. maybe ilya has sped it up recently but i dropped a use
of lookbehind because of speed. just grouping both strings like i posted
before would get you the cleanup you liked:

$line =~ s/(<!--increment here-->)(\d+)/$1 . ($2+1)/e;

white space always helps too. :-)

uri

-- 
Uri Guttman                             Hacking Perl for Ironbridge Networks
uri@sysarch.com				uri@ironbridgenetworks.com	


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

Date: Fri, 11 Dec 1998 13:53:13 -0800
From: Yogish Baliga <baliga@synopsys.com>
To: Helmut.Richter@lrz-muenchen.de
Subject: Re: how check string whether numeric value?
Message-Id: <36719448.69B1174A@synopsys.com>

You can make a regular expression check on $x to ensure that it contain
only numeric digits.

if( $x !~ m/^[0-9]+$/ ) {
   print  "$x is not a valid integer \n";
}

Hope this answers your question.

-- Baliga

Helmut Richter wrote:

> I can easily force a string, say $x, to be evaluated in numeric
> context:
>
>   $y = $x + 0;
>
> If then $y is nonzero, I can be sure that $x could be interpreted as a
> numeric value. If, however, $y is zero, the reason could either be
> that $x was a valid representation of the numeric value zero, or that
> $x was not a valid representation of any numeric value.  How can I
> distinguish the two cases?
>
> Helmut Richter



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

Date: 11 Dec 1998 20:12:16 GMT
From: eln@cyberhighway.net (Erik)
Subject: Re: How to read a binary file in Perl? How to install mod_perl?
Message-Id: <74rub0$9st$2@news.cyberhighway.net>

In article <1djuhii.bf6pwq1s1uaz4N@bay1-511.quincy.ziplink.net>,
	rjk@linguist.dartmouth.edu (Ronald J Kimball) writes:
> Bart Lateur <bart.lateur@skynet.be> wrote:
> 
>> I think it was intended as "unambiguusly".
> 
> I'm not sure what you mean by that...

I'm not sure what you mean by "that".[0]

[0] Suddenly, I feel a lot like Bill Gates[1]
[1] or Clinton

-- 
Erik Nielsen, Cyberhighway Internet Services NOC
Perl itself is usually pretty good about telling you what you shouldn't
do. :-)
             -- Larry Wall in <11091@jpl-devvax.JPL.NASA.GOV>


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

Date: Fri, 11 Dec 1998 14:11:26 -0500
From: M Dominic Ryan <ryanmd@mh.us.sbphrd.com>
Subject: IRIX 6.2 -> 6.5 problem with GDBM and 5.005_02?
Message-Id: <36716E5E.C2D8E33D@mh.us.sbphrd.com>

I have a GDBM hash database that is created/updated from an IRIX6.2
machine that I cannot read from an IRIX6.5 machine.  Both are using
5.005_02.  If I try to read the file I can dump the key/value pairs on
6.2, but no values are returned under 6.5, even though I can make both
open up successfully.

I include the -V output for both installations as there are slight
differences, although both sucessfully run modules such as PGPLOT which
seem to rely a lot on compiler details.

Is the -n32 or differing use of gcc a problem?  Any insights?

If you are able to help I would appreciate email as well if you are
posting a reply.

Many thanks.

 ......

Here is the -V output for 6.5:

Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
  Platform:
    osname=irix, osvers=6.5, archname=n32-irix-thread
    uname='irix phu164 6.5 05190003 ip20 '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define useperlio=undef d_sfio=undef
  Compiler:
    cc='/usr/local/bin/gcc', optimize='-O2', gccversion=
    cppflags='-D_BSD_TYPES -D_BSD_TIME -I. -I/usr/local/include
-DLANGUAGE_C'
    ccflags ='-D_BSD_TYPES -D_BSD_TIME -I. -I/usr/local/include
-DLANGUAGE_C'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='/usr/bin/ld', ldflags ='-n32 -L/usr/local/lib32
-L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib32 /lib32
    libs=-lgdbm -ldb -lm -lpthread
    libc=/usr/lib32/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-n32 -shared -L/usr/local/lib32
-L/usr/local/lib'


Here is the -V output for 6.2"
Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
  Platform:
    osname=irix, osvers=6.2, archname=sgi-irix-thread
    uname='irix64 hgu129 6.2 03131016 ip25 '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define useperlio=define d_sfio=define
  Compiler:
    cc='cc', optimize='-O2', gccversion=
    cppflags='-D_BSD_TYPES -D_BSD_TIME -I/apps/CCMM/local/SGI/include
-DLANGUAGE_C'
    ccflags ='-D_BSD_TYPES -D_BSD_TIME -I/apps/CCMM/local/SGI/include
-DLANGUAGE_C'
    stdchar='unsigned char', d_stdstdio=undef, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-L/apps/CCMM/local/SGI/lib'
    libpth=/lib /usr/lib /apps/CCMM/local/SGI/lib
    libs=-lsfio -lgdbm -ldb -lm -lpthread
    libc=/usr/lib32/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-shared -L/apps/CCMM/local/SGI/lib'


--
M. Dominic Ryan   (610)-270-6529  SmithKline Beecham Pharmaceuticals 
ryanmd@mh.us.sbphrd.com             King of Prussia, PA


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

Date: Fri, 11 Dec 1998 13:08:43 -0800
From: "David Christensen" <nospam@nospam.com>
Subject: Re: Learning Perl, 2nd edition, exercise 7.1b
Message-Id: <367189fc.0@news.california.com>

Andrew Johnson wrote in message <3670D4BE.190A0542@gatewest.net>...
>David Christensen wrote:
>!
>! Hello, World!
>!
>! I'm working my way through the above book, and everything was
>! rosy until I met exercise 7.1b.  My attempt at a solution is as
>! follows:
>!
>! #!/usr/bin/perl -w
>!
>! while (<>) {
>!     if ( /\\*\**/ ) {
>!         print $& . "\n";
>!     }
>! }
>!
>! Looking at the solution given in the back of the book, my
>! regular expression appears to be correct.  But, the program
>! doesn't give the expected output.  For example, running it
>! on my Linux box:
>!
>! /home/david/perl$ex07_1b
>! howdy!
>!
>! \* howdy doody!
>! \*
>! \\\*
>! \\\*
>! \**********\****\***
>! \**********
>! howdy \* doody!
>!
>!  \* howdy!
>!
>!
>! Note the space preceding the backslash in the last example.
>!
>! I was expecting the output to be "\*" for the last two lines...
>
>remember, you are asking to match a \ zero-or-more times, followed
>by a * zero-or-more times ... it'll match the first thing that
>matches that pattern --- in your latter cases, null matches that
>pattern just fine and long before the regex engine ever gets to
>the point where a backslash and asterisk occur (hey, I just
matched
>matched zero backslashes and zero asterisks and I didn't even have
>to leave the beginning of the string...) --- in other words, what
>might you expect zero whatevers to look like?
>
>hope this helps
>regards
>andrew

Agreed.  Thank you.  I assume problem was designed to lead to such
a realization.

Unfortunately, the "correct" solution bombs Perl on a Windows 98 or
NT machine running GNU Software for MS-Windows and MS-DOS.  :-(

Here is slightly modified version that "works":

#!/usr/bin/perl -w
#
# Schwartz, Randal L., and Christiansen, Tom, 1997, "Learning
# Perl", 2nd ed., O'Reilly & Associates, Sebastopol,
# California, USA, chapter 7, exercise 1(b):
#
# Construct a regular expression that matches any number of
# backslashes followed by any number of asterisks (any number
# might be zero).

print "\n";

while (<>) {
    if ( /\\*\**/ ) {           # per solution in Appendix A
        print $& . "\n";
    }
}

The 'print "\n";' seems to fix things...

David





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

Date: Fri, 11 Dec 1998 16:01:28 -0500
From: "Robby Coleman" <robc@AmericanMeter.com>
Subject: Re: PELRSHOP - not recognising SSI
Message-Id: <367187cf.0@news.mountain.net>

This caught me too.  The solution is simple though.  You simply need a space
before the final "-->".
I figured this out when I looked at the regular expression (the thing you
called "ugly").

Tad McClellan wrote in message ...
>jira@my-dejanews.com wrote:
>: I'm trying to set up SSI tags in my catalog pages for perlshop. However
it
>: seems perlshop doesn't seem recongise my SSI tags while processing the
>: catalog pages for return to the browser. The SSI tag i am using is
>: <!--#include file="filename.txt"--> the code i have isolated from
perlshop
>                                 ^^
>                                 ^^
>
>   the regex below requires a space between those two characters.
>
>
>: which is supposed to recognise the tag is below and set off the
approruiate
>: subroutine is below.
>
>
>: if (
>:
/\<!\-\-\#(include|fsize|flastmod|config|echo|exec)\s+(file|virtual|errmsg|s
i
>: zef mt|timefmt|var|cmd|cgi)\s*\=\s*\"(.*?)\" \-\-\>/i )
>                                              ^
>                                              ^ required space
>
>   That is pretty darn ugly.
>
>   Has ten unnecessary backslashes in it too.
>
>   I get worried using OPC (Other People's Code) when I see
>   that the programmer doesn't understand what needs escaping
>   and what doesn't.
>
>   Makes me wonder what other (perhaps more important) things
>   they don't understand...
>
>
>--
>    Tad McClellan                          SGML Consulting
>    tadmc@metronet.com                     Perl programming
>    Fort Worth, Texas




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

Date: Fri, 11 Dec 1998 20:16:23 GMT
From: beimer@uu.net (Barry Eimer)
Subject: Perl and Zip
Message-Id: <36717d61.609910596@news1.alterdial.uu.net>


Are there any Perl modules that provide an interface to Zip and Unzip
functions?  Or does anyone have any good routines for handling Zip and
Unzip files.

Thanks!
Barry



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

Date: Fri, 11 Dec 1998 16:48:30 -0500
From: "Matt Heusser" <matt@pcr7.pcr.com>
Subject: Re: Perl and Zip
Message-Id: <Gkgc2.82$8z.1219@news3.ispnews.com>


Barry -

You asked:
>Are there any Perl modules that provide an interface to Zip
>and Unzip functions?  Or does anyone have any good
>routines for handling Zip and Unzip files.


Assuming UNIX, Why not just:

$file = "matt.txt";
$zipfile = "matt.zip";
 system("zip $zipfile $file");


  #do_stuff
 }
system("unzip $zipfile");

Or, In a DOS environment -
   pkzip.exe/pkunzip.exe


 I think both of these are available as freeware.   ;-)

  I hope that helped.  Questions?  I'm just an e-mail away --->

Matt H.
matt@pcr7.pcr.com





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

Date: Fri, 11 Dec 1998 16:50:25 -0500
From: "Matt Heusser" <matt@pcr7.pcr.com>
Subject: Re: Perl and Zip
Message-Id: <sngc2.83$8z.1139@news3.ispnews.com>

>$file = "matt.txt";
>$zipfile = "matt.zip";
> system("zip $zipfile $file");
>
>
>  #do_stuff
> }

  --> Should have an extra curly-brace in there.
My error. ;-(

Matt H.




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

Date: Fri, 11 Dec 1998 14:48:54 -0500
From: "Marc D. Behr" <mbehr@web-enrichment.com>
Subject: Re: specify password in a ftp URL?
Message-Id: <36717726.43603661@web-enrichment.com>

Kin Cho wrote:

> I'm trying to use mirror in LWP::Simple to
> access a ftp site that requires password access.
> What does the URL look like?
> I tried:
>
> ftp://me@foo.com:password/bar.html
>
> without success.
>
> I'm aware of Net::FTP but I'm trying to keep things simple.
>
> Thanks.
>
> -kin

Try ftp://me:password@foo.com/bar.html

--
Marc D. Behr                            mbehr@web-enrichment.com
PGP Key ID: 0x1F1920BC
Fingerprint20 = 7DC2 3B63 EEB4 9328 0D44  7AC6 7E73 BCBF 1F19 20BC

It was a book to kill time for those who liked it better dead.





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

Date: Fri, 11 Dec 1998 22:25:18 +0100
From: "Kenny Weng" <kenny@weng.dk>
Subject: Splitting a string at a certain point
Message-Id: <74s2rc$49fi$1@news-inn.inet.tele.dk>

I want to split a string (42 characters):

    883170453681783178637391547125611486947630

into 2 strings (2 x 20 characters) and the "rest"

    88317045368178317863 (20)

    73915471256114869476 (20)

    30 (rest is 2 characters, maybe 4 other times)

How do I do this?

Please answer at kenny@weng.dk also
Kenny Weng







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

Date: 11 Dec 1998 00:00:00 +0000
From: j.poehlmann@link-n.cl.sub.de (Johannes Poehlmann)
Subject: STANDARD PERL for WIN 95/NT EXECUTABLE
Message-Id: <76d9Tp03UkB@link-n-j.poehlmann.link-n.cl.sub.de>

	(Weekly posting to comp.lang.perl.misc and de.lang.perl)

_Where to find the *STANDARD* windows 95/NT port of perl (binary) ?_

(The "standard" has a number of advantages over Microsoft's "Activeware"  
port. E.g. you can install perl modules  not contained in the binary  
distribution. As long as these  Modules do not use C-code you do not need a C- 
compiler )
Worldwide (Redirecting you to a "near" site )
    ftp://ftp.perl.com/pub/CPAN/ports/win32/Standard/x86/

    Look for a File like
          perl5.00402-bindist04-bc.zip
    there is a new Version (perl 5.005 ) released


Walnut Creek CD-ROM:
    They left the directory /ports/win32/Standard/x86/ empty.    (But not the  
directory /ports/win32/Activeware ... )
    They forgot to make up a link to the other places, where
    you could find the file:

You find the Files in alternative subdirectories:    /authors/ 
Gurusamy_Sarathy/
	    perl5.00402-bindist04-bc.zip
   or
   /modules/by-module/GSAR/
	    perl5.00402-bindist04-bc.zip

#------------------------------------
#  find here Gurusamy Sarathy's readme file
#------------------------------------

Welcome to the binary distribution of Perl for the Win32 platform.
This distribution has been compiled using the Borland C++ compiler
(version 5.02).  It is built around the latest production release of
Perl, version 5.004_02, which comes with Win32 support.

Please note that this distribution is not to be confused with
the pre-5.004 Perl port by the Activeware folks, or the binaries
they distribute (which are mostly referred to by "build" numbers).

This bundle contains almost everything you will need for using Perl
on Win32 platforms.  It also contains everything needed to build,
test and install additional perl modules from CPAN that you may not
find in here, provided they use the standard MakeMaker extension
build tools.  Since MakeMaker needs a `make' utility, a Win32 binary
of Dennis Vadura's `dmake' tool is supplied (see below for more on
`dmake').  For using this distribution to build extensions that need
a C compiler, you will also need either Borland C++ 5.02, or Visual
C++ (version 2.0 and later).


WHY WOULD YOU WANT THIS?
------------------------

  + You want to use perl on WindowsNT or Windows95, but you have
    no C compiler (or at least not one that will build perl).

  + You seem to have the compiler stuff, but not the patience or
    knowledge to deal with compiling perl and the various extensions.
    And you are happy to continue using the binary distributions that
    you know people are going to keep putting out once every half
    moon. [May not be exactly every half moon, but you'll keep the
    faith.  Remember to give away that compiler you don't use :)]

  + You have one of the supported compilers that will build Perl,
    but you want to jump-start your XSsively hardcore perl module
    development by taking this shortcut.  [But see the notes below
    on `USING IT WITH YOUR C COMPILER' for some caveats about doing
    this.]

  + You want a perl that is capable of doing sockets on Windows95,
    and you just have Visual C++. [The Visual C++ libraries known to
    date have a problem with sockets on Windows95, which might cause
    you trouble.  The Borland libraries, which this distribution was
    built with, do not have the problem.]


INSTALLATION
------------

To install:

   * Extract the archive so that the directory structure of the
     files is preserved.

   * `cd' to the top level directory.

   * Type `install' (if in the command shell) or click on
     `install.bat' (from the Explorer).  If that refuses to run for
     some reason, you can instead type `perl\bin\perl install.bat'
     in the command shell.  The setup process will ask a few
     questions and will offer to generate HTML documentation from
     the various files in the distribution.  A full installation
     requires about 20 megabytes of free space.

   * Add the installed location of PERL.EXE to your `PATH'.
     For instance, if you asked for things to be installed under
     `e:\perl', add `e:\perl\bin' to your PATH.

   * You will need to edit the contents of %NetConfig in
     `lib\site\Net\Config.pm' to set the names of the servers
     used by the libnet package.


PLATFORMS
---------

This binary distribution has been extensively tested only on WindowsNT.
Based on reports from others, I believe it also works on Windows95,
but I personally did not test it on that platform.  Note the supplied
binaries are for the x86 architecture.


WHAT IT CONTAINS
----------------

It includes the following packages:

	perl5.004_02
	dmake-4.1

	Alias-2.3
	Bit-Vector-4.2
	Curses-1.01                          [*]
	Data-Dumper-2.07
	DateCalc-3.2
	DateManip-5.10
	DBD-ODBC-0.16
	DBI-0.89
	Devel-Peek-0.83
	Devel-Symdump-2.00
	DProf-19970614                       [*]
	GD-1.14                              [*]
	libnet-1.0505                        [*]
	libwin32-0.08
	libwww-perl-5.11
	MD5-1.7
	MIME-Base64-2.03
	MLDBM-1.23
	Storable-0.5                         [*]
	String-Approx-2.1
	Tk402.002

NOTES:

[*] These packages needed porting or other fixes to compile and
    run properly.  All changes are included in the form of patches
    (the kind that can be applied using the GNU patch utility) in
    the `patches' subdirectory.  The full sources of all of
    these packages (with the exception of dmake, see below for that)
    can be found on the Comprehensive Perl Archive Network (CPAN).
    Point your web browser at "http://www.perl.com/CPAN" to find the
    CPAN site nearest you.

The package subdirectories under `distfiles' also contain other
documentation and testsuites that came with the package.  These are
not installed, so you may want to save them for later reference.

Please note that the patches are for information purposes only.
You don't have to apply them (or even know what a patch is) to use
this distribution.

In case you find yourself needing to build things from source, there
is a win32 port of GNU patch-2.1 at:
   http://www-personal.umich.edu/~gsar/patch2_1-win32.tar.gz
that can be used to apply the included patches.

The modules in the distribution doubtless reflect my own personal
pattern of use.  In some cases, I made a conscious decision not to
include modules that don't contain C or XS source, since it should be
possible to obtain, build and install such modules from CPAN without
too much trouble (or a C compiler), using perl and `dmake'.
Nevertheless, I shall add specific modules to the distribution if
there is demand.


DEMOS
-----

After you install the distribution and add its location to your PATH,
you can run the `widget' demo to check if your installed perl is
working properly.  To make sure your new PATH setting takes effect,
you may have to reboot.  Afterward, just type `widget' in the command
shell, or double-click on `widget.bat' from the Explorer.


DOCUMENTATION
-------------

If you choose, the installation process converts all the Plain Old
Documentation it can find into HTML pages.  There are normally stored
in the `html' subdirectory under the install location.  You can start
browsing the main perl documentation at `html/lib/pod/perl.html'.

If you choose not to install HTML, you can still browse almost
all of the perl documentation from the command line using `perldoc'.
Type `perldoc perldoc' to get started.

The `distfiles' area of the distribution also contains much HTML
documentation that is not handled by the install process.  You
may want to selectively copy parts of it to wherever you normally
install your web documents.


USING IT WITH YOUR C COMPILER
-----------------------------

If you don't have a supported C compiler, this section doesn't
apply to you.  If you have one, and intend using it to build
other modules that require a C compiler, then read on.

This distribution was compiled with Borland C++ 5.02, using `dmake'.
If you too have that compiler (or a later version), there are
no caveats about using this distribution for further builds of
extensions.  (I have heard earlier versions of Borland C++ have
a buggy linker that doesn't like the module definition files that
perl generates, so your mileage may vary if you're using
versions earlier than 5.02.)

If you don't have the Borland compiler, it is also possible to build
and use extension binaries compiled with Visual C++.  The converse--
using a perl binary built under Visual C++ with extension binaries
built under Borland C++--does not work due to a bug in the Visual
C++ linker (present as of version 5.0).  In other words, if you have
the Visual C++ compiler *and* you plan to use some pre-built
extensions in this distribution *and* compile some of your own using
the Visual C++ compiler, you will need the perl binaries that came
with this distribution.  So don't overwrite the perl binary with
one that you may have built yourself using the Visual C++ compiler.

The setup procedure will do the necessary things to make sure the
installed version of the `lib\Config.pm' file will work with your
compiler for future extension builds.


TERMS OF USE
------------

Perl can be freely distributed under the `Artistic License' or the
`GNU General Public Licence', described in the two files `Artistic'
and `Copying' respectively.  Most of the modules have statements to
the effect that they can be distributed under the same terms as Perl,
but you should download and check the individual module's sources to
be sure.

The included dmake tool is compiled from the latest public release of
dmake-4.1 available from `ftp://plg.uwaterloo.ca/pub/dmake/'.  The
binary is completely unsupported.  Full (commercial) support for dmake
may be obtained from its author.  See `http://dmake.wticorp.com/' for
the latest.  Note that public version of dmake-4.1 can only be
distributed under the GNU General Public Licence.

The remaining parts of this binary distribution itself can be
distributed under the same terms as Perl.  Beware that it is provided
"as is", and comes with absolutely no warranty of any kind, either
express or implied.  If you use the contents of this distribution, you
do so at your own risk, and you agree to free the author(s) of any
consequences arising from such use, either intended or otherwise.


BEING NICE TO NICE BEINGS
-------------------------

Perl is the creation of Larry Wall.  Continuing refinement of Perl
is made possible by the unceasing efforts of many fine folk who have
banded together with Larry in endless perlesque banter, collectively
calling themselves "The Perl Porters".  If you find perl useful
in getting your job done, you may want to drop them a note of
appreciation at <perl-thanks@perl.org>.  Be sure to recount
any war stories about how Perl helped you win your battles :)

Another fine way to encourage development of perl is to become a
member of The Perl Institute, a non-profit organization which helps
"people help Perl help people" (or something like that).  See
http://www.perl.org/ for details.

If you plan to put this on a CDROM or other similar media, I request
that you send me a brief message.  Note that some modules explicitly
require that you obtain permission from the module author to do that
sort of thing, so you should.  Altered versions of this distribution
must be clearly marked as such.

Enjoy!


Gurusamy Sarathy (Just Another Perl Porter)
gsar@umich.edu
08-AUG-1997



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

Date: Fri, 11 Dec 1998 15:00:58 -0500
From: "mark reed" <marst96@pitt.edu>
Subject: Re: Use script to send Standard Form Input?
Message-Id: <74rui9$99a$1@usenet01.srv.cis.pitt.edu>

theres a module that allows you to post to other scripts, dont remember its
name but goto cpan and look around.
ftp://ftp.metronet.com/pub/perl/cpan.html  I would have looked real quick,
but microsoft sucks and made it so that my browser wont work while outlook
is connected to news server. :( Really gotta get netscape :) But outlook did
just tell me that more than 80% of my message was quoted stuff which was a
cool reminder to get rid of it :)

Mark







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

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

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