[11056] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4656 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 14 23:03:29 1999

Date: Thu, 14 Jan 99 20:00:22 -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           Thu, 14 Jan 1999     Volume: 8 Number: 4656

Today's topics:
    Re: __DATA__ (Martien Verbruggen)
        Another newbie problem.  Help (Murphy)
    Re: Can I use perl with https? <glennco@northernnet.com>
        Can't delete file (IIS 4.0) timy@symax.com
    Re: cat filename | wc -l   perl equivalent (Abigail)
    Re: cat filename | wc -l   perl equivalent <uri@ibnets.com>
    Re: cgi filename arg has embedded "+" (Tad McClellan)
    Re: DBM questions please (Bill Moseley)
        Help with TeeOutput.pm <matthewb@mdhost.cse.tek.com>
    Re: Help with TeeOutput.pm (Randy Kobes)
        how to use Net::SMTP <zhouyh@263.net>
    Re: how to use Net::SMTP <mclellan@ReactionDesign.com>
        inclue text file in cgi output webmaster@lifesprings.net
    Re: inclue text file in cgi output (Tad McClellan)
    Re: Kind of Funny.. my first File::Path experience. <j00@ph33r.me.org>
    Re: Losing linefeeds when encrypting email (Keith)
    Re: perl cgi lsr1@my-dejanews.com
        pls help: parallelized Perl available ? (S.T. Wong)
    Re: pls help: parallelized Perl available ? (Daniel E. Macks)
    Re: printf "%04d", $Num; into a varible (Andre L.)
        Running a PERL program on NT (felicity)
    Re: Running Perl scripts for Macs dturley@pobox.com
    Re: Running Perl scripts for Macs dturley@pobox.com
    Re: Small script required. <jliebgot@eni.net>
    Re: Small script required. <rob_aNOSPAM@unipharm.com>
    Re: Small script required. (Steve Leibel)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Fri, 15 Jan 1999 03:53:01 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: __DATA__
Message-Id: <xYyn2.108$7u.772@nsw.nnrp.telstra.net>

In article <369DFB12.163AEF6C@lmco.com>,
	James B Crigler <james.b.crigler@lmco.com> writes:

> the version of perl in use here is 5.003---multiple years out of
> date.  Unlike my previous job, at this employer I don't have admin
> privileges.)

With perl 5.003 there is a good chance that you can _get_ root
priveleges. Tell you admin about that, and point them to www.cert.org.
And the security problems are not even the worst ones.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | We are born naked, wet and hungry. Then
Commercial Dynamics Pty. Ltd.       | things get worse.
NSW, Australia                      | 


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

Date: Fri, 15 Jan 1999 05:15:54 GMT
From: frball9@mail.idt.net (Murphy)
Subject: Another newbie problem.  Help
Message-Id: <36a1498f.14063919@news.idt.net>

I've written a simple (ok, a REALLY SIMPLE)  Perl script that gets the
date and time of a file and sends it back to the HTML...

Here is the entire code.....(I told you it was simple)

#!/usr/local/perl
    use File::stat;
    use Time::localtime;
    $file="sample.cgi";

    $date_string = ctime(stat($file)->mtime);
    $date=substr($date_string,3,7);
    $year=substr($date_string,20,4);
    $time=substr($date_string,10,9);
    print "Content-type:text/html\n\n";
    print "the date is $date $year\n<br>";
    print "the time is $time\n";

--------------------------
Now for the important 2 questions.

1-  what convention do I use to call this from the HTML???  I am
testing this script on a local OmniHTTP server.  What is the
convention for calling this script.?..

ie. This works <img src="/cgi-bin/visitor.exe">

2- Perhaps this should've been part of question 1, but anyway.
When calling this script, I want to pass a parameter to it, that being
the filename I want the info on.  I would obviously have to change the
Perl script to do this, but how?  All the examples I've seen currently
are forms, and that's not really what I'm looking for.

Any help on this would be greatly appreciated.

//sorry for posting this on both CLP and CLPM but I wasn't really sure
//where it would've been appropriate.
































Murphy

(Formerly known as Fireball.  With the new year, a new
outlook on life, hence the name change)

For links to OverClocking, 3D Cards, Dodge RAMS and Wrestling
jump to http://www.geocities.com/~fireball_x


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

Date: Thu, 14 Jan 1999 20:40:03 -0600
From: "Paul Glidden" <glennco@northernnet.com>
Subject: Re: Can I use perl with https?
Message-Id: <77m9qh$6qj$1@news.ispn.net>

In order to do this I'm pretty sure that you have to have the page that
posts to the cgi be secure also, there is no way that an unsecure page can
post to a secure cgi.  Once the page is using the public key it should be
able to send to the secure script just fine.


allen snook wrote in message <77jo8d$3td@q.seanet.com>...
>Hi all,
>
>I'm in the process of putting together a secure perl script, but I want the
>script to be run in an encrypted mode.  In my HTML that kicks off the
>script, I have a form call as follows:
>
><FORM ACTION="https://www.charm.net/~seattle/cgi-bin/ss.pl" METHOD=POST>
>
>When I click on ye olde submit button, I get the following error
>
>Method Not Allowed
>The requested method POST is not allowed for the URL
/~seattle/cgi-bin/ss.pl
>
>The permissions on the file are 755, of course.  If I replace the https
with
>http, it works fine, but obviously it is no longer secure.
>
>Is this a problem with my ISP, or perl?  My ISP hasn't answered my question
>yet.
>
>Thanks
>
>...Allen
>circuit@seanet.com.nospam
>
>
>
>




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

Date: 15 Jan 1999 01:59:37 GMT
From: timy@symax.com
Subject: Can't delete file (IIS 4.0)
Message-Id: <369ea109$0$16686@nntp1.ba.best.com>

Hi,

I am proting the CGI perl scripts I wrote for Linux to NT IIS 4.0. The perl engine is
ActivePerl. The security is set as Basic Authentication. There is one perl db (NTFS, 
grante permission to one special group of users) which will be updated when the 
script executed. At the same time, one lock file will be created before the 
DB being changed and removed after changed.

The interesting thing is, the lock file will be created but it can't be removed whatever
I use rmtree, unlink or system command (with rm.exe) (and I got permission deny.)

Any clue ?

In Linux, there are some limition because I set uid bit for those scripts which update
the DB (and lock file). But I am new to IIS. How it works ?

Thanks !!

-Tim     


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

Date: 15 Jan 1999 01:02:02 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: cat filename | wc -l   perl equivalent
Message-Id: <77m42a$rd7$2@client2.news.psi.net>

Greg Bacon (gbacon@itsc.uah.edu) wrote on MCMLXII September MCMXCIII in
<URL:news:77lo97$btp$1@info.uah.edu>:
;; 
;; : I need a perl equivalent command for the following:
;; : cat filename | wc -l
;; 
;;     #! /usr/bin/perl -w
;;     $lines++ while <>;
;;     print $lines, "\n";


        perl -wlpe '}$_=$.;{' filename



Abigail


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

Date: 14 Jan 1999 20:32:12 -0500
From: Uri Guttman <uri@ibnets.com>
To: abigail@fnx.com
Subject: Re: cat filename | wc -l   perl equivalent
Message-Id: <39sodd2ueb.fsf@ibnets.com>

>>>>> "A" == Abigail  <abigail@fnx.com> writes:

  A>         perl -wlpe '}$_=$.;{' filename

i was searching dejanews for that! i remembered how ugly it was and its
use of the -p loop source and the continue clause. i even mentioned it
in my post in this thread.

and why do you need -w? you are only using perl vars and they are all defined.

and i would never recommend using it in real life! :-)

uri

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


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

Date: Thu, 14 Jan 1999 21:00:08 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: cgi filename arg has embedded "+"
Message-Id: <ovam77.f9e.ln@magna.metronet.com>

William Toner (toner@jetsons.wv.tek.com) wrote:
: I'm building an HREF link from a perl script.  

: The link is to a CGI script and is supposed to pass 2 parameters 
: separated by the "+" sign.  

: My problem seems to be that the first parameter is a filename
: with the "+" sign in it, eg. file+233.pdf, so the HREF link ends up
: looking like 3 parameters instead of 2.  

: I've tried encoding the "+" using &#43; , but the problem seems to 
: be more on the output side of the equation than on the input side. 

: By encoding the "+" with &#43; , the filename gets presented to
: the screen as a "+" alright, but after I click on it, the output
: side of the equation does't "interpret" the "+", it still sees it
: as an additional argument to the cgi script. 

: Any ideas/help would be appreciated. 

: Please copy me on e-mail at toner@pogo.wv.tek.com


   Hmmmm. I read that whole thing.

   Where is your Perl question?


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


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

Date: Thu, 14 Jan 1999 17:26:23 -0800
From: moseley@best.com (Bill Moseley)
Subject: Re: DBM questions please
Message-Id: <MPG.11083919d67b005b989686@nntp1.ba.best.com>

[This followup was posted to comp.lang.perl.misc and a copy was sent to 
the cited author.]

In article <6yk8ypicir.fsf@acronym.anu.edu.au>, tpot@acsys.anu.edu.au 
says...
> > 2) Is there a reason that I need to use DB_File instead of AnyDBM_File? 
> 
> A very good reason!  AnyDBM_File provides a base class for
> implementing other DBMs (i.e DB_File, GDBM_File) and as such doesn't
> actually provide any functionality.  You will need to install a DBM
> package before you can actually do anything.

Not sure what you mean by "anything" here.  I'm currently using dbmopen 
and reading and writing records fine using whatever the default is for 
the perl build I have (SDBM?).  I don't need a large set of DBM 
functions.


> > 3) How do I check for write errors when using a DBM tied hash?
> >    $tied_hash{key} = 'hello!' or die "a terrible death $!"?
> 
> Hopefully you will pick up write errors during the initial tie() to
> the DBM rather than during a store operation.  GDBM_File calls croak()
> if the underlying write to the DBM file fails.

That sounds like recovery from an error would be troublesome.  Especially 
if I'm doing any roll-my-own simple transaction processing.


> Go for a proper RDBMS database with transaction processing.  The DBM
> stuff is just not suitable for anything other than storing keys and
> values in.

Ok, I'll poke around for info on RDBMS.  But for this simple database app 
that I'm working on I was hoping to keep things simple and not have to 
worry about installing modules.


Thanks for the input!

-- 
Bill Moseley mailto:moseley@best.com


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

Date: Thu, 14 Jan 1999 17:08:20 -0800
From: Matt Berney <matthewb@mdhost.cse.tek.com>
Subject: Help with TeeOutput.pm
Message-Id: <369E9504.A1BE3BAD@mdhost.cse.tek.com>

Hello,

I downloaded the TeeOutput.pm module in order to tee STDOUT to a logfile while
my script is executing.  This is exactly the functionality I want.  And, I would
rather not have to write it again.

My problem is that I can't seem to load the package in my script properly.

Questions:
  1.  Where do I place the "TeeOutput.pm" file?  I have no control over
      the installation directories.  So, I can't place the module in
      the same directory where perl is installed.

  2.  How do I invoke the "use" command to load the module?

Here is an example script that fails:

  #!/tools/perl5/bin/perl5
  use TeeOutput;

Can't locate Local/TeeOutput.pm in @INC at /login/matthewb/bin/testOpenTee
line3.
BEGIN failed--compilation aborted at /login/matthewb/bin/testOpenTee line 3.


If I change to my bin directory and execute the script:

Bareword "__WARN__" not allowed while "strict subs" in use at Local/TeeOutput.pm
line 44.
Bareword "__DIE__" not allowed while "strict subs" in use at Local/TeeOutput.pm
line 45.
Bareword "__WARN__" not allowed while "strict subs" in use at Local/TeeOutput.pm
line 67.
Bareword "__WARN__" not allowed while "strict subs" in use at Local/TeeOutput.pm
line 68.
Bareword "__WARN__" not allowed while "strict subs" in use at Local/TeeOutput.pm
line 74.
Bareword "__WARN__" not allowed while "strict subs" in use at Local/TeeOutput.pm
line 81.
Bareword "__WARN__" not allowed while "strict subs" in use at Local/TeeOutput.pm
line 82.
Bareword "__WARN__" not allowed while "strict subs" in use at Local/TeeOutput.pm
line 88.
Bareword "__WARN__" not allowed while "strict subs" in use at Local/TeeOutput.pm
line 105.
Bareword "__DIE__" not allowed while "strict subs" in use at Local/TeeOutput.pm
line 106.
 at /login/matthewb/bin/testOpenTee line 3.
BEGIN failed--compilation aborted at /login/matthewb/bin/testOpenTee line 3.

Thanks for any help you can provide.

Regards,
        Matt



-- 
==============================================================
Matt Berney                         email: Matt.Berney@Tek.Com
Measurement Business Division       Phone: (503) 627-6512
Tektronix, Inc.                     Fax:   (503) 627-5610
==============================================================


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

Date: 15 Jan 1999 03:03:26 GMT
From: randy@theory.uwinnipeg.ca (Randy Kobes)
Subject: Re: Help with TeeOutput.pm
Message-Id: <slrn79tci0.l0t.randy@theory.uwinnipeg.ca>

On Thu, 14 Jan 1999 17:08:20 -0800, 
	Matt Berney <matthewb@mdhost.cse.tek.com> wrote:
>I downloaded the TeeOutput.pm module in order to tee STDOUT to a logfile while
>my script is executing.  This is exactly the functionality I want.  And, I would
>rather not have to write it again.
>My problem is that I can't seem to load the package in my script properly.
>Questions:
>  1.  Where do I place the "TeeOutput.pm" file?  I have no control over
>      the installation directories.  So, I can't place the module in
>      the same directory where perl is installed.
>  2.  How do I invoke the "use" command to load the module?

Hi,
   You should check out perlfaq8 - How do I keep my own module/
library directory? In brief,
	perl Makefile.PL PREFIX=/home/of/my/perl/lib
prepares things for installation into your own private library,
and
	use '/home/of/my/perl/lib';
adds this directory to the @INC for your script.

-- 
		Best regards,
		Randy Kobes

Physics Department		Phone: 	   (204) 786-9399
University of Winnipeg		Fax: 	   (204) 774-4134
Winnipeg, Manitoba R3B 2E9	e-mail:	   randy@theory.uwinnipeg.ca
Canada				http://theory.uwinnipeg.ca/


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

Date: Fri, 15 Jan 1999 10:05:22 +0800
From: "wild horse" <zhouyh@263.net>
Subject: how to use Net::SMTP
Message-Id: <77m7o8$ao7$1@clinux.cz.js.cn>

this is my test program on win98&perl5.005:
   #!c:\perl\bin\perl.exe
   use Net::SMTP;
   $smtp = Net::SMTP->new('here.com'); # connect to an SMTP server
   $smtp->mail( 'user@here.com' );     # use the sender's address here
   $smtp->to('user@there.com');        # recipient's address
   $smtp->data();                      # Start the mail
   # Send the header.
   #
   $smtp->datasend("To: user@there.com\n");
   $smtp->datasend("From: user@here.com\n");
   $smtp->datasend("\n");
   # Send the body.
   #
   $smtp->datasend("Hello, World!\n");
   $smtp->dataend();                   # Finish sending the mail
   $smtp->quit;                        # Close the SMTP connection

But when I type"perl test.pl"
I got an error:
"Can't locate Net/SMTP.pm in @INC (@INC contains: C:\PERL\lib
C:\PERL\site\lib .)
 at smtp.pl line 3.
BEGIN failed--compilation aborted at smtp.pl line 3.
"





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

Date: Thu, 14 Jan 1999 18:14:22 -0800
From: "Clifton L. McLellan" <mclellan@ReactionDesign.com>
Subject: Re: how to use Net::SMTP
Message-Id: <6wxn2.725$6P4.9485@news.connectnet.com>

The error says that the system could not find Net/SMTP.pm.  Have you looked
around your system? can YOU find SMTP.pm in a subdirectory called Net?  If
not, you need to install this module.

Before you ask "how do I install a module" please read some documenation,
and tell us a little more about your perl version -- where did you get it or
who provided it?

--

Hope this helps,
Clifton L. McLellan

wild horse wrote in message <77m7o8$ao7$1@clinux.cz.js.cn>...
this is my test program on win98&perl5.005:
   #!c:\perl\bin\perl.exe
   use Net::SMTP;
   $smtp = Net::SMTP->new('here.com'); # connect to an SMTP server
   $smtp->mail( 'user@here.com' );     # use the sender's address here
   $smtp->to('user@there.com');        # recipient's address
   $smtp->data();                      # Start the mail
   # Send the header.
   #
   $smtp->datasend("To: user@there.com\n");
   $smtp->datasend("From: user@here.com\n");
   $smtp->datasend("\n");
   # Send the body.
   #
   $smtp->datasend("Hello, World!\n");
   $smtp->dataend();                   # Finish sending the mail
   $smtp->quit;                        # Close the SMTP connection

But when I type"perl test.pl"
I got an error:
"Can't locate Net/SMTP.pm in @INC (@INC contains: C:\PERL\lib
C:\PERL\site\lib .)
at smtp.pl line 3.
BEGIN failed--compilation aborted at smtp.pl line 3.
"







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

Date: Fri, 15 Jan 1999 01:55:12 GMT
From: webmaster@lifesprings.net
Subject: inclue text file in cgi output
Message-Id: <77m75r$3qm$1@nnrp1.dejanews.com>

Hi,

I'm trying to include a text file in my cgi output. basically to replace the
ssi call located in my "pageheader" that doesn't work with cgi output. It
works fine on the rest of my site when I'm serving SSI pages. However, when I
serve the cgi output from, for example, my search script, the SSI stuff isn't
there.

So, I'd like to substitute a <!--%%%--> comment line with the text file. In
an SSI html page the comment wont be seen and in the cgi output the #inclue
virtual SSi call wont be seen. I'd like it to look like the rest of my html
pages.

my site is at www.lifesprings.net

notice the Announcements on the right that are loaded with SSI.

How can I load that text file in the cgi output. With the substitue command?

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 14 Jan 1999 21:05:19 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: inclue text file in cgi output
Message-Id: <f9bm77.f9e.ln@magna.metronet.com>

webmaster@lifesprings.net wrote:

: I'm trying to include a text file in my cgi output. basically to replace the
: ssi call located in my "pageheader" that doesn't work with cgi output.

: How can I load that text file in the cgi output. 


   print HTML up to but not including the SSI looking thingy.

   skip the SSI looking thingy.

   open() the file
   print() each line
   close() the file

   print the rest of the HTML


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


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

Date: Fri, 15 Jan 1999 09:02:19 +0800
From: ph33r <j00@ph33r.me.org>
Subject: Re: Kind of Funny.. my first File::Path experience.
Message-Id: <369E939B.A118BB0C@ph33r.me.org>

ell-four-em-three

"Charles R. Thompson" wrote:

> I've seen the benefits of modules mentioned in posting here, and
> decided to use rmtree() in File::Path to replace about 20 lines
> of code in one of my scripts. This was my absolute first time
> with a module and I was already feeling a bit uneasy about it
> because it was new.
>
> It worked on the local server, so I uploaded the script via FTP
> to my ISP and sent it a command to delete a subdirectory. After
> doing that I went back to my FTP software to see if it was gone.
> Not only was it gone... so was my site.. oh man... wait.. so is
> the server! Oh my gosh... I'm going to jail.. I was *just
> testing a script your honor*.. I swear!!
>
> I quickly logged off in a panic and wondered if the wife and I
> could pack and make Canada before sunset.
>
> Then I realized... I had set my file filter on the FTP software
> to some obscure thing where *nothing* was showing up.
>
> Heh heh.. :)
>
> CT



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

Date: Fri, 15 Jan 1999 03:10:24 GMT
From: kew@-NOSPAM-teleport.com (Keith)
Subject: Re: Losing linefeeds when encrypting email
Message-Id: <369eb075.3077228@192.108.254.003>

 ----------------------------
 Followup msg to: 
 14 Jan 1999 18:03:18 -0500 
 comp.security.pgp.discuss 
 James Cameron <james@MatadorDesign.com> 
 <x7k8ype9u1.fsf@server.matadordesign.com>
>
>Hi,
>
>I have a question about lost carriage returns/linefeeds when pgp
>encryting an email message.
>
>Description: 
>
>I have a perl script running on a Unix server which takes an existing
>electronic mail message, encrypts it, and then sends it to the
>appropriate people.  The script works great except that when the
>recipient open and decrypts the message (using Eudora on Windows
>95/98) there are no carriage returns (or if they are there, they are
>not understood).  On the mac side, there is an odd character at the
>end of every line but at least there are indeed carriage returns.
>
>System info:
>
>PGP version:  linux50ib8
>
>Server System: BSDI 3.1
>
>Email: sending via standard SMTP.  Receiving in Eudora using PGP 
>       for Personal Privacy.  
>
>Encryption call: $pgp -r $user -r $user2 -o $encrypted -af $message
>
>Any suggestions or pointers would be much appreciated.
>

Have you tried to use the -t option in your PGP script?

Keith


--------------------------------
"WInning battles, people, is what we pay admirals and generals for."
Tom Clancy
--------------------------------------------------
http://www.teleport.com/~kew
http://www.teleport.com/~kew/simtelnet1999/ Latest Simtel Software Uploads List 


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

Date: Fri, 15 Jan 1999 01:50:00 GMT
From: lsr1@my-dejanews.com
Subject: Re: perl cgi
Message-Id: <77m6s4$3e2$1@nnrp1.dejanews.com>

I'd just start reading at webreview.com instead of books. Brent's articles are
great!



In article <369E2393.93442C03@rational.com>,
  Alan Rogers <arogers@rational.com> wrote:
> Hi,
>
> I am just getting started with the web and perl cgi can anybody
> recommend any books on the subject.
>
> Kinds Regards
> Alan Rogers
>
> arogers@rational.com
>
>


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 15 Jan 1999 01:31:18 GMT
From: st@logic.csc.cuhk.edu.hk (S.T. Wong)
Subject: pls help: parallelized Perl available ?
Message-Id: <77m5p6$lk9$1@justice.csc.cuhk.edu.hk>

Hi, there,

I'd like to know if any Perl extension for writing parallel programs is 
available.  Would anyone please help ?

Thanks a lot!

S.T. Wong                           | Email: st-wong@cuhk.edu.hk


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

Date: 15 Jan 1999 02:29:42 GMT
From: dmacks@mail2.sas.upenn.edu (Daniel E. Macks)
Subject: Re: pls help: parallelized Perl available ?
Message-Id: <77m96m$81h$1@netnews.upenn.edu>

S.T. Wong (st@logic.csc.cuhk.edu.hk) said:
: 
: I'd like to know if any Perl extension for writing parallel programs is 
: available.  Would anyone please help ?

If you'd done
  i /parallel/
from the CPAN.pm shell prompt, you'd have found that there is
Parallel::Pvm, a perl API for the Parallel Virtual Machine
library.

I've never used the perl interface, but I'm currently using PVM (with
Fortran and C) to do heterogeneous-platform parallel stuff. Works
quite well. Oh, and I use perl to schedule and monitor the tasks, and
to process the results. PVM's not that hard to set up, and it makes
writing parallel (message-passing) programs rather straightforward.

dan
--
Daniel Macks
dmacks@a.chem.upenn.edu
dmacks@netspace.org
http://www.netspace.org/~dmacks



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

Date: Thu, 14 Jan 1999 20:11:33 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: printf "%04d", $Num; into a varible
Message-Id: <alecler-1401992011330001@dialup-716.hip.cam.org>

In article <77m11s$ufr$1@nnrp1.dejanews.com>, hcking@acssun.pstcc.cc.tn.us
wrote:

> I can print padded number like "1" as "0001" with printf, but can I get
>    that into a varible? 

Sure, use sprintf(). 

   $formatted = sprintf "%04d", $num;

HTH,
Andre


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

Date: Fri, 15 Jan 1999 01:44:09 GMT
From: (felicity)
Subject: Running a PERL program on NT
Message-Id: <77m6nf$vb2$2@camel0.mindspring.com>

I am having difficulty gettring any Perl Programs to run on my NT box.
Please pardon my ignorance with this question.

The location provided in the script is /usr/bin/perl

Is that the directory the script is looking for the Perl interpreter?

If its not at that location, how do I install it on an NT box?

Would greatly appreciate any insights.

Thank you.

Peter



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

Date: Fri, 15 Jan 1999 00:54:56 GMT
From: dturley@pobox.com
Subject: Re: Running Perl scripts for Macs
Message-Id: <77m3ks$i1$1@nnrp1.dejanews.com>


>
> I assume that I will need to get MacPerl to interpret the script for the
> Mac. I'm just wondering if I'm going to need to write two version of the
> same app.
>
> Thanks,
> Jason
>
You could always simply try it. :-)

Bu to answer your questions, for the most part the "Perl" is the same. Path
seperators, line endings, and system calls need to be watched. Have a look at

http://pudge.net/macperl/perlport.html to see how things vary.



____________________________________
David Turley
dturley@pobox.com
http://www.binary.net/dturley/

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Fri, 15 Jan 1999 00:59:46 GMT
From: dturley@pobox.com
Subject: Re: Running Perl scripts for Macs
Message-Id: <77m3tt$n5$1@nnrp1.dejanews.com>

In article <369DFF33.5500@berbee.com>,
  ringwood@berbee-no-spam-.com wrote:

> The total parts of the code that were non-platform specific was
> about 98% (I did count at one point). That's pretty darn good and
> tells me that while there are gotcha's, Perl is as close to
> cross platform as anything.

Really makes you wonder why Java and not Perl gets all the cross-platform
hype. Java is about as c-p as, well, gee, I can't think of anything less
cross- platform. :-)

____________________________________
David Turley
dturley@pobox.com
http://www.binary.net/dturley/

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Fri, 15 Jan 1999 01:00:09 +0000
From: Jim Liebgott <jliebgot@eni.net>
Subject: Re: Small script required.
Message-Id: <369E9319.2CB49312@eni.net>

Rob Annandale wrote:
> 
> If I was to do this in UNIX scripting, the script would look like this...
> 
> #!/bin/sh
> A_TERM=vt100
> export A_TERM
> runcbl -f userid.acu
> 
> userid.acu is the name of my COBOL CGI script.

in Perl:

#!/usr/bin/perl
$ENV{A_TERM}='vt100';
system("runcbl","-f","userid.acu");


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

Date: Thu, 14 Jan 1999 17:47:50 -0000
From: "Rob Annandale" <rob_aNOSPAM@unipharm.com>
Subject: Re: Small script required.
Message-Id: <369e9dde$0$13734@fountain.mindlink.net>

Thanks to all that helped.
Your scripts were successful.

Rob Annandale




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

Date: Thu, 14 Jan 1999 19:14:01 -0800
From: stevel@coastside.net (Steve Leibel)
Subject: Re: Small script required.
Message-Id: <stevel-1401991914010001@192.168.100.2>

In article <369e7a34$0$13736@fountain.mindlink.net>, "Rob Annandale"
<rob_aNOSPAM@unipharm.com> wrote:


> I cannot wait for the book to arrive from Amazon in 7 to 14 days to learn
> how to do a really simple procedure for now, so I hope someone here can help
> me.
> 

Of course a nontechnical solution is to request next-day air.

Steve L.
stevel@coastside.net


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

Date: 12 Dec 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 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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