[11055] in Perl-Users-Digest
Perl-Users Digest, Issue: 4655 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 14 20:03:28 1999
Date: Thu, 14 Jan 99 17:00:18 -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: 4655
Today's topics:
*.pl Files ? And now ? <goks@s-direktnet.de>
Re: *.pl Files ? And now ? <allan@due.net>
Re: *.pl Files ? And now ? (Abigail)
Re: @ARGV and $_ Question <uri@ibnets.com>
Re: [Q] how to check the existence of ^M in a text file (Tad McClellan)
Re: Advance Data Structure of Perl 5.0 (brian d foy)
Re: Another RegExp. (Tad McClellan)
Re: cat filename | wc -l perl equivalent (Tad McClellan)
cgi filename arg has embedded "+" (William Toner)
Re: CONCLUSIVE PROOF: John is dead though <dkr@globalnet.co.uk>
Re: DBM questions please <tpot@acsys.anu.edu.au>
Re: format NAME= <rick.delaney@home.com>
Re: Help please..bad file handle error <dave@icepop.demon.co.uk>
Re: Looking for Perl programmer in NYC area (brian d foy)
Re: Looking for Perl programmer in NYC area <uri@ibnets.com>
Losing linefeeds when encrypting email <james@MatadorDesign.com>
LP eg. 3-2 doesn't work?? - Win32 prob?? <tharoldson@home.com>
printf "%04d", $Num; into a varible hcking@acssun.pstcc.cc.tn.us
Re: printf "%04d", $Num; into a varible <jeromeo@atrieva.com>
Re: reading and returning data from a file <aqumsieh@matrox.com>
Small script required. <rob_aNOSPAM@unipharm.com>
Re: Small script required. <rick.delaney@home.com>
Re: talking to my children <shum@cig.mot.com>
Re: Were to learn PERL Online. <blainn@worldnet.att.net>
Re: what would you do? (brian d foy)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 15 Jan 1999 00:26:22 +0100
From: "Gvks" <goks@s-direktnet.de>
Subject: *.pl Files ? And now ?
Message-Id: <77luge$9ng$1@goof.de.uu.net>
Hello,
maybe one of U can help me ;-)
I am not a perl/cgi professional and I've loaded several .pl files.
I know that I have to upload them into my cgi-bin directory etc.
But a friend told me that I havt to compile it first into *.cgi !?
Is this true ? And if yes how and with what for tools I can do this ?And
what I have to look for ? Plz help me ...
Thank you very much
Gvks
goks@s-direktnet.de
------------------------------
Date: 15 Jan 1999 00:08:13 GMT
From: "Allan M. Due" <allan@due.net>
Subject: Re: *.pl Files ? And now ?
Message-Id: <77m0td$p1e$0@206.165.165.159>
Gvks wrote in message <77luge$9ng$1@goof.de.uu.net>...
:Hello,
:maybe one of U can help me ;-)
:
:I am not a perl/cgi professional and I've loaded several .pl files.
:I know that I have to upload them into my cgi-bin directory etc.
:But a friend told me that I havt to compile it first into *.cgi !?
With friends like that who needs enemies. It is possible that your files
might need to be named with a .cgi extension but that is a server related
issue.
:Is this true ?
No.
:And if yes how and with what for tools I can do this ?And
:what I have to look for ? Plz help me ...
I have to say that if you need to ask this question then the probability of
your scripts working may be kind of low. Time to start reading all the
wonderful Perl documentation that is provided with your distribution. Also,
it might be a good idea to spend a little time at www.perl.com.
HTH
AmD
------------------------------
Date: 15 Jan 1999 00:59:00 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: *.pl Files ? And now ?
Message-Id: <77m3sk$rd7$1@client2.news.psi.net>
Gvks (goks@s-direktnet.de) wrote on MCMLXII September MCMXCIII in
<URL:news:77luge$9ng$1@goof.de.uu.net>:
// Hello,
//
// maybe one of U can help me ;-)
That's "you", not "u".
// I am not a perl/cgi professional and I've loaded several .pl files.
Goodie. Loaded on what? From where? What's in those .pl files?
// I know that I have to upload them into my cgi-bin directory etc.
That's fine. I know squirrels live in trees.
// But a friend told me that I havt to compile it first into *.cgi !?
Compile what? And why?
// Is this true ? And if yes how and with what for tools I can do this ?And
// what I have to look for ?
Maybe you should first try to figure out what you want. If your question
is how to install programs using the CGI protocol, talk to your system
administrator. She can tell you how the server is configured.
// Plz help me ...
That's "Please", not "Plz".
Abigail
------------------------------
Date: 14 Jan 1999 18:07:07 -0500
From: Uri Guttman <uri@ibnets.com>
Subject: Re: @ARGV and $_ Question
Message-Id: <39ww2p3144.fsf@ibnets.com>
>>>>> "RD" == Rick Delaney <rick.delaney@home.com> writes:
RD> Uri Guttman wrote:
RM> print;
RM> # or
>> >>
RM> print "\n";
>> >>
>> >> that will just print a blank line. only a naked print uses $_ by default.
>>
RM> Actually it printed both ways for me.
>>
>> i highly doubt that. can you show some code where you set $_ and use
>> both prints and it prints twice?
RD> perl -pe 'print "\n";print;chomp' /etc/passwd
cheater!
:-)
uri
--
Uri Guttman Hacking Perl for Ironbridge Networks
uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
Date: Thu, 14 Jan 1999 17:03:26 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: [Q] how to check the existence of ^M in a text file on Unix
Message-Id: <u3tl77.1cd.ln@magna.metronet.com>
Ken McNamara (conmara@tcon.net) wrote:
: $/ = undef;
If you are going to change $/ like that ...
: $allfile = join('',<infile>);
... then you don't need the join().
$allfile = <infile>; # same result!
: $foundit = $allfile =~ /\cM/;
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 14 Jan 1999 18:40:25 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Advance Data Structure of Perl 5.0
Message-Id: <comdog-ya02408000R1401991840250001@news.panix.com>
In article <77ljr9$4kg@bmw.hwcae.az.Honeywell.COM>, "gip" <gibsonc@aztec.asu.edu> posted:
> # Below is the structure I want to use, based off page 273-274 of
> Programming Perl.
>
> # I want to know how to assign members' values. For example, the following
> is my first try, which doesn't work. What I want to know is how to set up
> an assignment statement that would set the fields for a members.
the perldsc (data structure cookbook) has excellent examples for
creating, accessing, and printing complex data structures of the sort
you mention.
good luck ;)
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: Thu, 14 Jan 1999 16:17:06 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Another RegExp.
Message-Id: <2dql77.j4d.ln@magna.metronet.com>
Forrest Reynolds (dropzone@mail.utexas.edu) wrote:
: What is that first "?" doing in the regex?
(?: regex )
does the same as
( regex )
except it does not trigger capturing.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 14 Jan 1999 17:17:27 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: cat filename | wc -l perl equivalent
Message-Id: <7utl77.1cd.ln@magna.metronet.com>
K. Spence (kspence@modes.tc.faa.gov) wrote:
: --------------1D95BA3877559AF2BCC3621D
: Content-Type: text/plain; charset=us-ascii
: Content-Transfer-Encoding: 7bit
What is that for?
Please fix the configuration of your "newsreader".
Usenet is a plain text medium.
: I need a perl equivalent command for the following:
: cat filename | wc -l
Well, that is a UUOC, and so would only earn derision
from your peers.
I'm sure you don't want that, so I think you want the perl
equivalent for
wc -l filename
:-)
perl -ne 'END{print "$. lines\n"}' filename
: Actually, what I really need to do is count all
: the lines in the text files in a directory.
: like
: cat filename.h && filename.c | wc -l (kind of)
Now I don't know what you want since that command sequence
doesn't work too well.
Do you want the _total_ lines for all files?
cat filename.h filename.c | wc -l
If so, then just give the above one-liner more than one filename.
Or do you want the line count for _each_ file?
wc -l filename.h filename.c
If so, then:
---------------
#!/usr/bin/perl -w
while (<>) {
if (eof) {
print "$. $ARGV\n";
$. = 0;
}
}
---------------
: --------------1D95BA3877559AF2BCC3621D
: Content-Type: text/html; charset=us-ascii
: Content-Transfer-Encoding: 7bit
: <HTML>
HTML is for the WWW.
This is Usenet.
Usenet is not the WWW.
Don't post that stuff either.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 14 Jan 1999 15:03:13 -0800
From: toner@jetsons.wv.tek.com (William Toner)
Subject: cgi filename arg has embedded "+"
Message-Id: <77lt3h$s5a@jetsons.wv.tek.com>
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 + , but the problem seems to
be more on the output side of the equation than on the input side.
By encoding the "+" with + , 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
Thanks!
-BT
------------------------------
Date: Fri, 15 Jan 1999 00:26:23 -0000
From: "R4949" <dkr@globalnet.co.uk>
Subject: Re: CONCLUSIVE PROOF: John is dead though
Message-Id: <77m22c$g9f$1@newnews.global.net.uk>
Bry wrote in message <369c9729.12224759@news.mnsinc.com>...
>Recently, eric <eendersnospam@ford.com> wrote:
>
>>John Lennon said so, so there!
>
>But now he is dead! A pity really. He was a nice guy!
Ditto Jesus...
------------------------------
Date: 15 Jan 1999 11:51:40 +1100
From: Tim Potter <tpot@acsys.anu.edu.au>
To: moseley@best.com
Subject: Re: DBM questions please
Message-Id: <6yk8ypicir.fsf@acronym.anu.edu.au>
moseley@best.com (Bill Moseley) writes:
> I'm working with a small relational database - three or four related
> files, with just a few hundred or so records. Nothing to big.
>
> 1) My target system doesn't have DB_File installed. If I use 'exists' to
> check a key in a dbm I get "AnyDBM_File doesn't define an EXISTS method"
> Is "defined $tied_hash{key}" the way to check if a key exists w/o
> DB_File?
Using defined() is the correct method for checking if a key exists,
but see the answer to 2) below.
> 2) Is there a reason that I need to use DB_File instead of AnyDBM_File?
> The database will stay on the target machine, and I don't need any
> special features of the other DBMs.
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.
> 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.
> 4) Any suggestions on transaction processing? I've got a relational
> database with three database files. What if the last write of a multi-
> write operation fails? Any suggestions on how to clean up to the
> previous state in all the files?
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.
Tim.
> --
> Bill Moseley mailto:moseley@best.com
------------------------------
Date: Fri, 15 Jan 1999 00:31:11 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: format NAME=
Message-Id: <369E8E1A.F3888675@home.com>
[posted & mailed]
Jack Fitts wrote:
>
> how does one join two formats?
You can't just concatenate them. You could use eval to create it on the
fly, as suggested in the perlform manpage.
$name1 = '
Program @<<<<<<< Does thus and so @<<<<<<<< page @<<
$prog, $date, $page
';
$name2 = '
Sequence Field1 Field2
';
$name3 = '
sequence Field1 Field2 Field3 Field4.
';
if ($file1) {
$format = "format STDOUT_TOP = $name1$name2.\n";
}
else {
$format = "format STDOUT_TOP = $name1$name3.\n";
}
eval $format;
die $@ if $@;
Read up on perlform for more tricks.
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: Thu, 14 Jan 1999 23:46:30 +0000
From: David Robinson <dave@icepop.demon.co.uk>
Subject: Re: Help please..bad file handle error
Message-Id: <ELO5ADAWHon2Ew4E@icepop.demon.co.uk>
For the record you were right the first time. Removing the $ from
PRICE_FILE fixes the original code.
Thus:
#!/usr/local/bin/perl
push(@INC, "/cgi-bin");
require("cgi-lib.pl");
&ReadParse(*input);
open (PRICE_FILE, "sys2.txt");
while (<PRICE_FILE>) {
chop;
($item, $price) = split(/:/,$_,2) ;
$price_list{$item} = $price ;
}
Thanks for the advice..you are right I don`t know enough yet, but I
learned a little bit about file handles and Perl modules today.
In article <369E2BC3.C3699F75@snailgem.org>, Eugene Sotirescu
<eugene@snailgem.org> writes
>Problem also is, the author doesn't check return values.
>Do this, to get better diagnostic messages:
>
>$file = /full/path/to/yourfile;
>open (PRICE_FILE, $file) or die "Can't open $file: $!";
>
>He also forgets to close the file. After the while loop you should:
>
>close $file or die "Can't close $file: $!";
>
>(This is not gonna fix the code, but might give you a better idea about
>what's amiss).
>
>I also don't understand why he keeps using $PRICE_FILE, since this is a
>file handle not a variable.
>
>Finally, FWTW, 2 pieces of advice:
>
>1. cgi-lib.pl is old, unsupported technology. There's better stuff out
>there now, like the CGI.pm module. Learn this one, and you won't be
>wasting your time.
>2. Judging from your confusion, you don't know enough Perl to deal with
>this. Hermmann's book doesn't give you enough Perl background, and you
>get stuck with nonsense code like open ($PRICE_FILE= "/sys2.txt").
>Get yourself a good Perl book, otherwise you'll be following blindly
>other people's mistakes, when you should be making your own.
>
>
>
>David Robinson wrote:
>>
>> In article <369DF489.6660646E@snailgem.org>, Eugene Sotirescu
>> <eugene@snailgem.org> writes
>> >> the line: open ($PRICE_FILE, "/sys2.txt"); may be the problem...
>> >> " bad file handle error"
>> >
>> >Looks like a mistake in the book:
>> >try PRICE_FILE everywhere where it says $PRICE_FILE
>>
>> Thanks Eugene just tried that and it still throws up the same
>> errors...it`s seems as though the script can`t interpret the data in the
>> data file.
--
David Robinson
------------------------------
Date: Thu, 14 Jan 1999 18:37:12 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Looking for Perl programmer in NYC area
Message-Id: <comdog-ya02408000R1401991837120001@news.panix.com>
In article <397lup4n84.fsf@ibnets.com>, Uri Guttman <uri@ibnets.com> posted:
> >>>>> "bdf" == brian d foy <comdog@computerdog.com> writes:
>
> bdf> you might try the nyc-perl-jobs list:
>
> bdf> send to: majordomo@hfb.pm.org
> bdf> in body: subscribe nyc-perl-jobs
>
> bdf> brought to you by the New York Perl Mongers :)
> what about creating more jobs lists for other pm's? or a open one for
> telework? and how can we get those lists some publicity?
tell me what you want and i'll see what i can do. i thought Boston.pm
already had one though...
oh, thanks for volunteering to moderate it Uri :)
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: 14 Jan 1999 18:42:07 -0500
From: Uri Guttman <uri@ibnets.com>
Subject: Re: Looking for Perl programmer in NYC area
Message-Id: <39vhi92zhs.fsf@ibnets.com>
>>>>> "bdf" == brian d foy <comdog@computerdog.com> writes:
bdf> In article <397lup4n84.fsf@ibnets.com>, Uri Guttman <uri@ibnets.com> posted:
>> >>>>> "bdf" == brian d foy <comdog@computerdog.com> writes:
>>
>> what about creating more jobs lists for other pm's? or a open one for
>> telework? and how can we get those lists some publicity?
bdf> tell me what you want and i'll see what i can do. i thought Boston.pm
bdf> already had one though...
i am not totally sure. for starters, a place for employers and agencies
to post/mail job openings and for job seekers to post availability,
maybe resumes. all jobs must be perlcentric (is that a new term?). not
sysadmin with some perl or webmaster with lots o'stuff including perl. i
mean perl developing as the primary (but not exclusive) function.
boston pm does not have a list that i know of for jobs. TPJ has a very
simple jobs board that needs much improvement but it has does some good.
how active is your list? how are you publicizing it to employers/job
seekers/agencies?
bdf> oh, thanks for volunteering to moderate it Uri :)
if it gets me contracts, it will be worth it.
i am slowly on the road to setting up my own mailing lists on my home
system. but at the rate i have been going i may retire bfore then. :-)
uri
--
Uri Guttman Hacking Perl for Ironbridge Networks
uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
Date: 14 Jan 1999 18:03:18 -0500
From: James Cameron <james@MatadorDesign.com>
Subject: Losing linefeeds when encrypting email
Message-Id: <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.
-James Cameron
Matador Design, Inc.
http://www.MatadorDesign.com
------------------------------
Date: Fri, 15 Jan 1999 00:53:00 GMT
From: Terry Haroldson <tharoldson@home.com>
Subject: LP eg. 3-2 doesn't work?? - Win32 prob??
Message-Id: <369E753D.8C640C3A@home.com>
I'm just starting, but can't get this to work correctly everytime (using
5.09). It seems to work correctly after I first reboot, but then won't
anymore.
using this example from 'Learning Perl' (ch. 2):
#ex_03-2
#Learning Perl Appendix A, Exercise 3.2
print "Enter the line number: "; chomp($a = <STDIN>);
print "Enter the lines, end with ^D:\n"; @b = <STDIN>;
print "Answer: $b[$a-1]";
running it gives:
Enter the Line Number:1
Enter the Lines, end with ^D:
line1
line2
line3
Answer: line1
works correctly (as above) first time, but after that, never echoes the
'answer', ie:
Enter the Line Number:1
Enter the Lines, end with ^D:
line1
line2
line3
I suppose it is is the same problem as mentioned by Eric Bohlman today
re: bugs in the Win32 console routines. But it's a pain. Is there
anything else to do, other than redirect output to a file.
Or I am I doing something wrong???
Thanks....Terry.
------------------------------
Date: Fri, 15 Jan 1999 00:10:42 GMT
From: hcking@acssun.pstcc.cc.tn.us
Subject: printf "%04d", $Num; into a varible
Message-Id: <77m11s$ufr$1@nnrp1.dejanews.com>
I can print padded number like "1" as "0001" with printf, but can I get
that into a varible? I'd like to use it for numbering. Like:
foreach my $Num (1..30)
copy( FILE, PC{padding if needed}$Num.txt);
I could
if($Num < 10)
$Num = "0$Num";
but that could get to be a lot of if's!
Thanks!
hal
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 14 Jan 1999 16:36:04 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
To: hcking@acssun.pstcc.cc.tn.us
Subject: Re: printf "%04d", $Num; into a varible
Message-Id: <369E8D74.3091A82C@atrieva.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?
Use sprintf instead of printf.
Good Luck!
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: Thu, 14 Jan 1999 12:38:50 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: reading and returning data from a file
Message-Id: <x3yd84hrbyt.fsf@tigre.matrox.com>
Mike O'Brien <mikeob@itas.net> writes:
>
> This is a multi-part message in MIME format.
> --------------4A2496489AE1A0B0795D6E88
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
Usenet is a text only medium .. don't do that!
> Hi everyone.
>
> How can I search a text file for | , return the numeric position, search
> for | again,return the position subtract the two and then return the
> lenght of the data inbetween the two |'s. Depending on the data's length
> I want to read it in to an scalar.
Well, if you may, I can reword your request as so:
You would like to extract the text located between the first and
second occurrences of the '|' character. Depending on the length of
this string, you will act accordingly.
Assuming this, you can do the following:
$text = 'The first | some text in between. Before the second |
someting here too and a third | yeah';
($string) = $text =~ /\|([^|]+)\|/;
$length = length $string.
Now you have the string in $string and its length in $length. Do
whatever you want with them.
> Any ideas?
Yeah many!
> Seek()
> read()?
ha? did you bother reading about those commands yet?
> Mike
and no vcards please!
------------------------------
Date: Thu, 14 Jan 1999 15:15:40 -0000
From: "Rob Annandale" <rob_aNOSPAM@unipharm.com>
Subject: Small script required.
Message-Id: <369e7a34$0$13736@fountain.mindlink.net>
I have an Apache Web Server that uses CGI forms written in COBOL.
The CGI forms do not work, but I know I can make them work if I run
them from a Perl script. I downloaded the interpreter from SCO skunkware
and ordered an O'Reilly Perl book with the intent to learn Perl.
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.
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.
If anyone can submit the above code equivalent to me in Perl
I would appreciate it greatly.
My UNIX is SCO 5.04d and runcbl can be run from anywhere.
______________________________________________
Robert B. Annandale
"Love all, trust a few and do wrong to none..."
- William Shakespeare
------------------------------
Date: Thu, 14 Jan 1999 23:28:52 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Small script required.
Message-Id: <369E7F77.B3E25E7E@home.com>
[posted & mailed]
Rob Annandale wrote:
>
> I downloaded the interpreter from SCO skunkware
> and ordered an O'Reilly Perl book with the intent to learn Perl.
>
> 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.
While you're waiting, start reading the great documentation that comes
with perl. You will still want to refer to it even after receiving your
book.
man perl
or
perldoc perl
>
> If I was to do this in UNIX scripting, the script would look like
> this...
> #!/bin/sh
#!/usr/local/bin/perl -w
perldoc perlrun
> A_TERM=vt100
> export A_TERM
$ENV{A_TERM} = 'vt100';
perldoc perlvar
> runcbl -f userid.acu
system('runcbl', '-f', 'userid.acu');
perldoc -f system
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: Thu, 14 Jan 1999 17:40:25 -0600
From: Edmond Shum <shum@cig.mot.com>
Subject: Re: talking to my children
Message-Id: <369E8069.4CED1379@cig.mot.com>
Did you try to use
pipe (RD,WR)
It has been there since perl4.
--
Edmond Shum System and Network Administration
Motorola CIG email: shum@cig.mot.com
Arlington Heights, IL phone: 847-632-6702
------------------------------
Date: 14 Jan 1999 23:45:34 GMT
From: Blain Nelson <blainn@worldnet.att.net>
Subject: Re: Were to learn PERL Online.
Message-Id: <369E81A1.1E13EC73@worldnet.att.net>
Tad McClellan wrote:
>
> Learn to use the hundreds of pages that were installed on
> your hard disk when you installed perl:
>
> perl -n -e 'print if /^=/ && /learn/i' perlfaq*.pod
>
I know this is true, but it's also not very useful. The people who can get much
value out of all this stuff you (and many others) point people at aren't going
to be coming here asking these questions. Those things do say in at least
several places I've seen something to the effect of "look to clpm for more
information and help."
> ... it then goes on to list about a dozen books.
>
> Use the docs Luke.
>
After beating my head against the wall for a month or so, I did buy a llama and
a camel and have found them to be very useful. I did find their treatment of
little things like references to be damn near useless, and the on-line FAQ
thingy on them to be very helpful in putting some detail where the camel left
obscurity.
People are coming to Perl with no background, hearing all of the promises of how
easy and powerful it is. That's going to continue and grow IMO. If that's the
case, growing more on-line things along the line of the on-line FAQ thingy on
references to help them is going to be a wise choice -- either that or just
cutting all the rhetoric on how wonderful and easy and powerful Perl is.
The docs speak very well to some people. And to some people they are pages of
frustration with a line or two that is either useful for the question at hand or
understandable (not always at the same time). The situation for Linux has been
similar, but there is the LDP which seems to be making a serious effort at
bridging this gap and making useful information available to the beginner
(hopefully more effectively and less expensively than anything with the word
"dummies" in the title).
I don't want to sound like I'm flaming Larry or Tom or Randal or anybody -- I'm
not. But they don't walk on water and their wonderful writing style isn't going
to speak to everybody. The more people we have describing how to do something,
the more people are going to be able to learn from it.
> : Please e-mail me back!
>
> Nope.
>
> Ask it here, get the answer here.
>
Point accepted.
> --
> Tad McClellan
Take care,
Blain
--
The quality of a person's life is in direct proportion to their
commitment to excellence, regardless of their chosen field of endeavor
- Vince Lombardi http://www.blainn.cc/
blain@blainn.cc ICQ:19857966 anon-20630@anon.twwells.com
------------------------------
Date: Thu, 14 Jan 1999 18:43:12 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: what would you do?
Message-Id: <comdog-ya02408000R1401991843120001@news.panix.com>
In article <369e5f9c.0@news1.ibm.net>, "walter" <tavi@earthling.net> posted:
> I have 2 possible ways of doing something (Sample A and B below).
> I would like to know which you you use any why.
> Sample A : chr ( hex $sample )
> Sample B : pack ( "c", hex($sample ) )
i like Sample A because it tastes great and is less typing.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
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 4655
**************************************