[7739] in Perl-Users-Digest
Perl-Users Digest, Issue: 1364 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 25 05:07:41 1997
Date: Tue, 25 Nov 97 02: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 Tue, 25 Nov 1997 Volume: 8 Number: 1364
Today's topics:
Anyone have or know of a HTML to MS Word doc converter <cleighto@*ctron.com>
Re: Date/Time Comparisons on Win32 platform? (Steffen Beyer)
Deleting 2 or more spaces anywhere.. (Thomas Munn)
Re: getting output from system (Martien Verbruggen)
Re: help with macperl... <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
How can I call MKS shell on WinNT4.0 from Perl ?? <Yuval_Yosef@ccm.jer.intel.com>
Re: How can I hide the Query string in the URL? (Tad McClellan)
How to determine if a value is "readonly"? (Toutatis)
Re: How to execute CGI script written in perl on NT ser <mikihasa@worldnet.att.net>
Re: interpreted languages ((no.)spam)edu (Scott Schwartz)
Message Board Scripts Help <econnor@usa.net>
Re: Newbie having RE problems. (Tad McClellan)
Re: passing more than 1 variable in a href (Toutatis)
Re: peculiar warnings ??? <stevem@ny.ubs.com>
Perl with CyberCash <nsequeira@vest.com>
piping output of multiple files mmoores@digitech.net
Re: print (...) interpreted as function <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Re: print (...) interpreted as function (Jonathan Feinberg)
run time package binding problem <Neil_Goodgame-1@sbphrd.com>
Re: security questions <dmcgarry@moodindigo.dontspamitsnotnice.com>
Re: shoving STDOUT into a scalar <joe@harp.gsfc.nasa.gov>
This is a test, please ignore. me@some.where.org
This is a test, please ignore. me@some.where.org
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 24 Nov 1997 11:52:23 -0500
From: Corey Leighton <cleighto@*ctron.com>
Subject: Anyone have or know of a HTML to MS Word doc converter written in Perl 5?
Message-Id: <65cbqf$aqm$1@mer-news.ctron.com>
Wondering if anyone can help me on this on. I am doing some work on a
apache web server and need to get a tool that will convert html to MS
Word. Its OSF v3.1 I think (yes, I know its old, but it serves its
purpose.
I want to do the conversion on the server's end, so all those Windows
tools couldn't be more useless. I was wondering if anyone had knowledge
of a perl script that would do this conversion. If you know of a
non-perl program somewhere that would do the trick, that would also be
helpful, its just that I need to source since I am almost positive I
would have to build it myself.
If anyone has any info on this, please send me an email.
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Corey Leighton cleighto@*ctron.com
Cabletron Systems, Inc. ext. 5510
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
------------------------------
Date: 23 Nov 1997 22:30:07 GMT
From: sb@en.muc.de (Steffen Beyer)
Subject: Re: Date/Time Comparisons on Win32 platform?
Message-Id: <65aapf$c1b$1@en1.engelschall.com>
Robert Emerick <remerick@erols.com> wrote:
> I need some help making comparisons between two dates/times.
> I am extracting data from a file and need some assistance in
> understanding how to convert a string into a date and/or time so that I
> can perform some comparisons between various dates/times. I thought
> that there would be some modules out there to handle this but I have not
> found anything yet. Any pointers would be greatly appreciated.
> Thanks,
> Bob Emerick
> remerick@erols.com
You should get the port of Perl for Windows by Gurusamy Sarathy.
The distribution file is called "perl5.00402-bindist04-bc.tar.gz".
It's about 5 MB.
It is available from any CPAN ftp server, if I remember well, from
the "ports" subdirectory, if I'm not mistaken (or search DejaNews
for the exact address, it has been mentioned somewhere in this newsgroup
before!).
As the name says, it's Perl 5.004_02, or brandnew, in other words
(at least compared with all other Windows ports!).
The distribution contains an enormous bunch of useful modules, so
you don't need to worry about porting and compiling them.
This includes the module "Date::DateCalc", which should do anything
you want.
(To compare dates, transform them to the number of days since 1st of
january of the year 1 using the function "calc_days")
Hope this helps.
Yours,
--
|s |d &|m | Steffen Beyer <sb@sdm.de> http://www.sdm.de/
| | | | "Doing science means to let reality teach
| | | | you better over and over again, forever"
------------------------------
Date: Mon, 24 Nov 1997 01:33:55 GMT
From: munn@bigfoot.com (Thomas Munn)
Subject: Deleting 2 or more spaces anywhere..
Message-Id: <65alia$acb$1@nu-informer.alliance.net>
I have used the regular expression to remove 2 or more spaces:
s/\s{2,}/\s/
This causes only spaces that aren't bounded by numbers, letters etc. to be
replaced. Could someone post how to get ALL examples of two or more spaces,
accounting for word boundaries, numbers letter, and alphas, in a regular
expression and replace them with just space??
Thanks,
Thomas
------------------------------
Date: 24 Nov 1997 02:24:22 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: getting output from system
Message-Id: <65aogm$id3$1@comdyn.comdyn.com.au>
In article <65a5dh$is5@mtinsc02.worldnet.att.net>,
"Michael R. Harper" <mikihasa@worldnet.att.net> writes:
> I would like to capture (save as a variable) the output (STDOUT) from a
> program that I execute (using the system command) during a Perl script.
> Can anyone give this Perl newbie some help?
Have you actually read the documentation on system()?
perldoc -f system
[snip]
This is I<NOT> what you want to use to capture the output from a
command, for that you should use merely backticks or qx//, as
described in L<perlop/"`STRING`">.
[snip]
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | In a world without fences, who needs
Commercial Dynamics Pty. Ltd. | Gates?
NSW, Australia |
------------------------------
Date: Sun, 23 Nov 1997 17:12:23 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: help with macperl...
Message-Id: <65ak97$c30@bgtnsc03.worldnet.att.net>
The really big difference is that you need to keep track of a few Mac
centric things, the most important one being that the Mac file separator is
":" rather than "/" or "\" You may also have to keep track of file creators
and types to let Webstar know that a file, for instance, is an HTML file.
I would suggest downloading MacPerl, putting it on a machine that has Web
services enabled, and creating a link to the documentation (it's HTML based
and in the "docs" folder.) Then you can use any browser you can get your
hands on to view it. There's one page in particular that covers Mac-specific
features.
Hope this helps.
--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl
MrPc wrote in message <347856AA.A74FE475@redrose.net>...
>i recently made some scripts for my school's web server assuming it ran
>unix when i learned that it was a mac (i hate those things) running
>webstar. i looked for sites that gave tutorials on macperl but found
>nothing helpful. can ne1 tell me the major differences between unix
>perl and macperl? thanks in advance =+}...
>
------------------------------
Date: Mon, 24 Nov 1997 15:42:08 +0200
From: yuval yosef <Yuval_Yosef@ccm.jer.intel.com>
Subject: How can I call MKS shell on WinNT4.0 from Perl ??
Message-Id: <34798430.F27B22D4@ccm.jer.intel.com>
Hello all!
I'm new to Perl as to MKS.
I would like to run MKS Shell from Perl
I'll be happy i some one can help me
Thanks,
Yuval
------------------------------
Date: Mon, 24 Nov 1997 07:35:03 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: How can I hide the Query string in the URL?
Message-Id: <7qvb56.or.ln@localhost>
Mosl Roland (founder@pege.org) wrote:
: I am programer since 1976. Now I am webdesigner.
: So my profession is it to make information about
: my customers easy to find by search engines.
: I find it always very difficult to find information about
: perl on the web.
: Perl programers like always to be very confusing.
Perl _programs_ like often to be very confusing.
;-)
(most often due to regexs, I'd guess. Any language that uses "regular
expressions" has potential to look confusing...)
: So what's about a project to find every question
: about perl answered by Altavista or infoseek.
That would be great, though not easy to do.
: For example, I started perl without any documentation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There _is_ no perl without documentation.
All proper perl distributions have hundreds of pages of documentation
included.
I assume you had perl installed when you started your project?
If the documentation was not also installed, then you have an
incomplete installation.
In that case, you should ask each and every question about Perl that
occurs to you of whoever it was who installed perl and denied you
access to fast easy answers.
After a few dozen questions, they will likely come around to having
a proper perl installation ;-)
: and did not find out how to add 2 strings together.
: When my project will be ready, You can ask infoseek
: "how can I add to strings together in perl"
: and infoseek will give You the right answer.
"how can I mash together two strings"
"how do I get two strings joined together into one string"
"If I have two strings, and I want to make another string with
the contents of those two stuck together, how would I do that"
"how do I concatenate two strings"
All of those (and _many_ others) should lead to the same answer.
The last one already does lead to the answer in the above mentioned
docs that are installed on your system (a word search for 'concatenate'
finds only eight matches).
: Search engines are wonderfull, when they have the
: right information :-).
They _do_ have the right information. The above questions is easily
answered via a Dejanews search. Of course, it helps if you give some
thought to the phrasing of the query.
Someone who does not know that 'concatenate' is the operation that
joins strings will, of course, have a harder time of it.
The issue is _finding_ the right information.
: Got the idea of my project?
Yes. Sounds like a wonderful idea.
Sounds like a whole bunch of man hours to do though...
: The idea is to design together many pages answering
: every question about perl in a way, that a beginer can
: understand it and find it easy by a search engine.
: Most perl pages contain only examples, where an
: advanced perl programer wants to show every reader,
: that the reader is a idiot.
They cannot be an idiot if they have decided to learn Perl ;-)
: How wants to work with me together in this project?
: Make perl a easy to learn language.
This would be a Natural Language Processing application. Those are
non-trivial to implement. That's probably why someone hasn't already
done it ;-)
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: 24 Nov 1997 00:17:00 GMT
From: toutatis@no.mail.please (Toutatis)
Subject: How to determine if a value is "readonly"?
Message-Id: <toutatis-ya023180002411970117010001@news.euro.net>
For a function, I want to determine if the 1st element
in @_ is readonly (hardcoded in the program) or passed
as a variable. Actually, it is for a debugging program
I use, and I optionally want to pass one parameter,
without being forced to always pass it a first parameter.
Debug($thisvalue,$thatvalue);
Debug(1,$thisvalue,$thatvalue);
sub Debug {
if(readonly(@_){
$thoroughly = shift;
}
#print @_ fancy and deep $thorougly
}
sub readonly {
?????????
}
--
Toutatis
------------------------------
Date: Mon, 24 Nov 1997 06:04:21 -0500
From: "Michael R. Harper" <mikihasa@worldnet.att.net>
Subject: Re: How to execute CGI script written in perl on NT server?
Message-Id: <65bmn1$k4m@bgtnsc03.worldnet.att.net>
If you want to execute the script upon entering the page (without the
user clicking on a button or something) you may need to use a server
side include (SSI) exec command in the html. The basic format is:
<!--#exec cmd="your_script.cgi" -->
The SSI exec command might be disabled on your server since some system
administrators think it opens a big hole in the security of your
system. If your site allows CGI programs but not the SSI exec command,
ask the SA to turn the exec command back on (or turn off CGI!).
Michael R. Harper
mikihasa@worldnet.att.net
Drive wrote:
> Hi everybody,
>
> Am new in writing CGI scripts and therefore need help badly in
> advising me
> how to execute my script written in perl on an Windows NT server......
>
> I have tested my script by calling it from the browser and it works
> fine.
> But I am not sure of how to call it from my html file which will need
> to
> execute the script whenever anybody enters that particular page.
> Hence, I
> can't use Get or POST?
>
> My script is as follows :
>
> #!usr/local/bin/perl
>
> $basedir = "g:\\drive\\cgi-bin";
> $countfile = "count.txt";
> $page = "My main page";
>
> # Start of the counter log
> print "Content-type: text/plain\n\n";
> &lock_file;
> exit;
>
> #################################################
> # Locks the counter log file
> #################################################
>
> sub lock_file {
> open(LOG, "<$basedir/$countfile");
> flock(LOG, 2);
> &format_count;
> &write_count;
> close (LOG);
> flock (LOG,8);
> }
>
> #################################################
> # Processes the format of the hits saved
> #################################################
>
> sub format_count {
> while (<LOG>) {
> chop;
> ($file, $count) = split(/:/, $_);
> $counts{$file} = $count;
> }
> }
>
> #################################################
> # Writes the number of hits to counter log
> #################################################
>
> sub write_count {
> $counts{$page}++;
> seek(LOG, 0, 0);
> # Write the counts back to the file.
> foreach $file (keys %counts) {
> print LOG $file, ":", $counts{$file}, "\n";
> }
> }
>
> Pls advise. Thank you so much!
>
> Rgds,
> Candice
> drive@mbox4.singnet.com.sg
------------------------------
Date: 23 Nov 1997 19:56:29 -0500
From: "schwartz+%!usenet!" @ finch.cse.psu.((no.)spam)edu (Scott Schwartz)
Subject: Re: interpreted languages
Message-Id: <8g2007kt36.fsf@finch.cse.psu.edu>
Dima Pasechnik <dima@duti515a.twi.tudelft.nl> writes:
| I found this paper not too accurate as far as Scheme is concerned.
| Apparently they didn't use a good implentation.
They used MIT scheme.
| bash-2.00$ scheme48 -h 6000000
You need a 6M heap just to walk over two 200K vectors? And why do you
have to statically allocate it?
--
postmaster@[127.0.0.1]
postmaster@localhost.
------------------------------
Date: Mon, 24 Nov 1997 09:23:48 -0500
From: Evan Connor <econnor@usa.net>
Subject: Message Board Scripts Help
Message-Id: <34798DF4.A4A4D025@usa.net>
I am a Web Designer who has undertaken the task of adding Matt's Script
Archive Message Board to a client site I am developing (even though I am
not a PERL programmer.)
I am having problems with the CGI file on the server. I get a server
config error whenever I try to post a test message. If anyone is
willing to help me install this or at least talk me through the process,
I would gladly repay you by doinf some advanced HTML or graphic for you
in return. Plus, I will publicly thank you for your help.
Thanks in advance!!!!
EC
------------------------------
Date: Mon, 24 Nov 1997 08:01:01 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Newbie having RE problems.
Message-Id: <ta1c56.cv.ln@localhost>
Robin Marshall (robin@highway1.com.au) wrote:
: I was wondering if anyone could help me with a problem I am having. I
: have a gargantuan data file which is a comma-delimited database of
: intersections and road crashes. Unfortunately some of the rows use ST
: for street, while others use STR and so on, hence creating a number of
: unique names for a single street. What I want to do is extract this word
: from a string in the form:
: "ALBANY HIGHWAY "
: "ALBANY HWY "
: "NORTH ALBANY HIGHWAY "
: This would give me a list of words such as HWY, HIGHWAY, ST, ROAD etc,
If we can assume that the word of interest is the last word, and
that it cannot contain a space, then:
$word = $1 if /(\S+)\s*$/;
should come pretty close.
: which I could then examine and identify the overlapping names, which
Much better would be to count each 'word' and sort them by frequency:
# UNTESTED
foreach $name (@names) {
$words{$1}++ while /(\S+)\s*$/g;
}
foreach (sort {$words{$b} <=> $words{$a}} keys %words) {
printf "%6d: %s", $words{$_}, $_;
}
: would be easier than reading through a 14000 line database! I would
: really appreciate any help with this problem.
Hope that did.
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: 23 Nov 1997 23:54:48 GMT
From: toutatis@no.mail.please (Toutatis)
Subject: Re: passing more than 1 variable in a href
Message-Id: <toutatis-ya023180002411970054460001@news.euro.net>
"Vaughn Fox" <vfox@nbnet.nb.ca> wrote:
> I'm trying to pass 2 variables in an href statement
> from a web page. I've been working with variations of the following:
>
> <a href="http://whatever/script.pl?variable1&variable2">link</a>
>
> I pick up the first variable in my script no problem using the following:
>
> if ($#ARGV >= 0)
> {
> $variablename1 = $ARGV[0];
> }
> else
> {
> whatever;
> }
>
> I've tried picking up the 2 variable using variations of this:
>
> if ($#ARGV >= 1)
> {
> $variablename2 = $ARGV[1];
> }
> else
> {
> whatever;
> }
>
>
> I can't seem to pick up that 2 variable. What am I doing wrong?
Not reading the manual.
Knowing where to find your query string (actually, in
$ENV{QUERY_STRING}) is the *basics* of CGI programming,
which is explained within the first 200 lines of
*any* CGI tutorial.
--
Toutatis
------------------------------
Date: Mon, 24 Nov 1997 11:42:39 -0500
From: Stephen Miano <stevem@ny.ubs.com>
Subject: Re: peculiar warnings ???
Message-Id: <3479AE7F.8CC72541@ny.ubs.com>
When the eval statement is in single quotes it works.
eval 'print STDOUT " EL \n";
$ia_add = " DATA \'h1A \'h2B \'h3C \'h4D \'h5E \'h6F ";
printf STDOUT " %s\n" , $ia_add ;' ;
I tested with STDOUT
Sefi Kraemer wrote:
> Hi,
>
> I can't figure out how to get rid of the following warnings.
> I run perl5.001 .
> I appreciate your advice.
>
> Thanks,
>
> Sefi.
>
> lines executed by 'eval':
> -------------------------
> print SRC " EL \n";
> $ia_add = " DATA \'h1A \'h2B \'h3C \'h4D \'h5E \'h6F ";
> printf SRC " %s\n" , $ia_add ;
>
> persistant warnings:
> --------------------
> Bare word found where operator expected at (eval 110) line 1, near "'h1A
> 'h2B"
> (Missing operator before h2B?)
> String found where operator expected at (eval 110) line 1, near "h2B
> 'h3C '"
> (Do you need to predeclare h2B?)
> Bare word found where operator expected at (eval 110) line 1, near "'h3C
> 'h4D"
> (Missing operator before h4D?)
> String found where operator expected at (eval 110) line 1, near "h4D
> 'h5E '"
> (Do you need to predeclare h4D?)
> Bare word found where operator expected at (eval 110) line 1, near "'h5E
> 'h6F"
> (Missing operator before h6F?)
--
------------------------------------------------------------
Stephen G. Miano 212-821-6028
stevem@ny.ubs.com
stevem@esm.com
------------------------------
Date: Sun, 23 Nov 1997 15:39:29 -0800
From: Nathan Sequeira <nsequeira@vest.com>
Subject: Perl with CyberCash
Message-Id: <3478BEAF.B66CC631@vest.com>
I've created an application with electronic commerce using CyberCash on
a Netscape Enterprise 3.0/LiveWire platform on a Windows NT 4.0 server.
CyberCash uses Perl scripts for some of its functional parts. One of
the scripts that is on their site (wilder.rwc.cybercash.com, and the
script is called BATCH_GEN1.PL) is supposed to batch and settle all
transactions at a user-defined time of the day. My knowledge of Perl is
negligible anyway, but it appears that this script runs a loop which
settles each transaction one at a time (I'm including the whole script
at the end of this message). However, I don't know where to go from
here at all. How do I integrate this script into my application? I
suppose I need to include it as a CGI script in Netscape. Do I have to
add it as an external object library in LiveWire? How do I set it to be
executed at a certain time of the day? What variables need to be passed
from my LiveWire application to the script, and how is this done?
Thanks for any help.
-- Nathan Sequeira
nsequeira@vest.com
415-986-8378
===========================================================
#!/usr/local/bin/perl
#
# Check Perl version
#
require 5.001;
#
# Require some libraries
#
use CCLib qw(SetServer sendmserver);
#
# Constants to find the merchant payment server
#
%payment = ( 'host' => 'my.domain.com',
'port' => 8000,
'secret' => 'secret-mycybercash-id');
&SetServer(%payment);
$amount = 'amount';
$orderid = "#OrderID#";
%result = &sendmserver('batch-commit',
'order-id-1', $orderid,
'amount-1', $amount,
'txn-type-1', "marked",
'num-txns', 1);
#
# just dump results to stdout.
# you should process them...
# to allow results to affect operation of your fulfillment...
#
foreach (keys(%result)) {
print " $_ ==> $result{$_}\n";
}
------------------------------
Date: Sun, 23 Nov 1997 18:42:17 -0600
From: mmoores@digitech.net
Subject: piping output of multiple files
Message-Id: <880331968.27359@dejanews.com>
i have a program which pipes input from tail:
open F1, 'tail -f alertlog|' or die 'cannot tail';
while (<F1>) {
# do some filtering and send email, etc
}
this program blocks, and will just sit there..
i would like to tail on several 'alert log' files
with one perl script.
i suppose i could just keep a list of files i want
to monitor, and periodically test and save the file size.
if the file size changes then i must have input,
so seek to the LAST file size and parse to EOF.
any other solutions? how about multithreading?
does perl support it? that would be fun.
also, when i parse a line of input i pass it through
a regular expression like:
if (/^ORA\-/ or /Warning|Error/) then {#handle stuff here}
how can i use indirection to get the filter expressions
from a file and dynamically change them without stopping
the program?
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Mon, 24 Nov 1997 06:21:30 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: print (...) interpreted as function
Message-Id: <65c2gi$5hm@mtinsc02.worldnet.att.net>
Well, print isn't actually a function, but it is. You can check to see if
print worked, which means it returns a value, so it's sort of a function.
But what Perl is talking about here is this construct:
print ("foo");
where you put what's to be printed in parentheses, so Perl thinks you might
be talking about
sub print { }
which would of course be a dumb thing to do. You could work around it this
way:
unless ($logfile eq "-") {print '<A HREF="',path_info () . $ref . '.' .
$logfile, '">', $logfile, '</A>'}
or if you really want the unless to go behind the print statement:
$p = '<A HREF=' . path_info() . $ref . '.' . $logfile. '">' . $logfile .
'</A>';
print $p unless ($logfile eq "-");
Hope this helps,
--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl
Alexander Farber wrote in message <65bpf4$6dc4@aken.eed.ericsson.se>...
>Hi,
>
>when i am using the -w switch, i become the warning
>"print (...) interpreted as function" at the following line:
>
>print ('<A HREF="', path_info () . $ref . '.' . $logfile, '">', $logfile,
'</A>')
> unless ($logfile eq '-');
>
>Isnt this strange? Isnt print a function? And i also would be
>grateful, if someone could explain me, why do i get the warning
>"Use of uninitialized value" at the lines:
>
>use CGI qw (:standard :html3);
>$upload_dir = '/www/doc' . path_info ();
>
>Thank you for your help!
>Alex
>
>
------------------------------
Date: Mon, 24 Nov 1997 09:23:04 -0500
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Re: print (...) interpreted as function
Message-Id: <MPG.ee357d2fc464f4898968d@news.concentric.net>
eedalf@eed.ericsson.se said...
> when i am using the -w switch, i become the warning
The zen shell programmer BASHo said:
when i am using the -w switch, i become the warning
when i am using the -e switch, i become the one-liner
when i am using the -h switch, i become the help
now i am using the -h switch
So, in his spirit:
> "print (...) interpreted as function" at the following line:
Using the 'diagnostics' pragma reveals:
(W) You've run afoul of the rule that says that any list operator followed
by parentheses turns into a function, with all the list operators arguments
found inside the parentheses. See perlop/Terms and List Operators (Leftward).
The point being, that perl can't determine whether you really mean for all
of the arguments to 'print' to be enclosed in those parens, or whether the
following stuff on the line (if there are commas) was supposed to go to 'print',
also. It's not an error; it's a warning.
Do look up 'use diagnostics'.
> And i also would be
> grateful, if someone could explain me, why do i get the warning
> "Use of uninitialized value" at the lines:
>
> use CGI qw (:standard :html3);
I also find that the CGI module is not "-w safe." I use -w during (shell)
debugging, and then remove it when it's CGI time.
--
Jonathan Feinberg jdf@pobox.com Sunny Manhattan, NY
------------------------------
Date: Mon, 24 Nov 1997 11:56:31 +0000
From: Neil Goodgame <Neil_Goodgame-1@sbphrd.com>
Subject: run time package binding problem
Message-Id: <34796B6F.41C6@sbphrd.com>
I have a perl module that needs to instantiate one of possibly many perl
module, depending on a certain creteria , during the initialization
process. I have already suucessfully required the correct package in
the BEGIN block.
This is the code -
BLOCK: foreach $a (@DIRECTORY){
$a =~ s/.pm//;
# check to see if $a package handles files of $source
last BLOCK if templates::$a::diagnose($source);
}
# instantiate package of $a
$this->{'seqobj'} = templates::$a::new();
with this code I get the following error message -
Bad name after templates:: at SequenceServer.pm line 85.
It should, using the :: notation, figure out the class to call at run
time but this does not appear to happen.
- its as the call to the correct function is bound before $a is
expanded.
Is there a way I can expand $a before the correct function call is bound
--
remove * from email address to reply
======================================================
Neil Goodgame Smithkline Beacham
*Neil_Goodgame-1@sbphrd.com
======================================================
------------------------------
Date: Sun, 23 Nov 1997 21:36:06 -0500
From: "Dan McGarry" <dmcgarry@moodindigo.dontspamitsnotnice.com>
Subject: Re: security questions
Message-Id: <347a3962.0@news.cyberus.ca>
Bruno Prior wrote in message
<01bcf855$fb2759e0$0201a8c0@prior.ftech.co.uk>...
>Laurel Shimer <autopen@autopen.com> wrote in article
><autopen-2211971825250001@dynamic12.pm03.mv.best.com>...
>>
>> Am I'm barking up the wrong tree?
>
>Yes, for a number of reasons.
>
>1. As I'm sure will be pointed out to you more agressively by others, this
>message does not belong in comp.infosystems.www.authoring.html, although I
>understand the temptation to post to this group because of the quality of
>advice which is available there.
[snip!]
I'm framing this one. Bravo!
--
Dan McGarry
OverByte Software
http://www.moodindigo.com/
------------------------------
Date: 24 Nov 1997 11:35:02 -0500
From: Joe McMahon <joe@harp.gsfc.nasa.gov>
Subject: Re: shoving STDOUT into a scalar
Message-Id: <ylcra86dzd5.fsf@harp.gsfc.nasa.gov>
"Brad Fitzpatrick" <usenet_post@bradfitz.com> writes:
> To the point: what I'd like to do is capture everything printed to STDOUT
> for a portion of my script and concatenate it all together in one scalar.
>
Is there a reason you're not using
$scalar = join("",<STDIN>)
?
--- Joe M.
------------------------------
Date: 23 Nov 1997 23:50:58 GMT
From: me@some.where.org
Subject: This is a test, please ignore.
Message-Id: <65afh2$n4k$1@news-t.computek.net>
This is a test, please ignore.
------------------------------
Date: 23 Nov 1997 23:49:37 GMT
From: me@some.where.org
Subject: This is a test, please ignore.
Message-Id: <65afeh$n42$1@news-t.computek.net>
This is a test, please ignore.
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.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 1364
**************************************