[7669] in Perl-Users-Digest
Perl-Users Digest, Issue: 1295 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 10 10:14:38 1997
Date: Mon, 10 Nov 97 07:00:31 -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 Mon, 10 Nov 1997 Volume: 8 Number: 1295
Today's topics:
'sort problem (Periat Henri)
Re: @ARGV Limits or Attempts to avoid "glob: Too many a <jamesr@aethos.co.uk>
Re: @ARGV Limits or Attempts to avoid "glob: Too many a (Casper H.S. Dik - Network Security Engineer)
Another newbie network/sockets Q. <robertor@typhoon.co.jp>
Being strict with filehandles! crr026@email.mot.com
Re: Being strict with filehandles! <rra@stanford.edu>
Re: Better Way in Perl <curtis@ei.kodak.com>
Re: Better Way in Perl <curtis@ei.kodak.com>
Book: Software Engineering With Perl (Opinion ?) (Woody Jin)
Re: By value or reference <markm@nortel.ca>
Re: Command line options (Johan Vromans)
Re: CPAN confusion <kermit@ticnet.com>
Distribution of perl for windows platforms (Aviel Rubin)
Re: FileHandles <rra@stanford.edu>
Geanfammer Perl program announcement (biological) <jong@mrc-lmb.cam.ac.uk>
Re: HELP NEEDED: Why won't my script work? <shiloh@shell9.ba.best.com>
Jobs -Pa. <edpbala@fast.net>
NCSA Httpd Error 500 (devesh)
Re: NCSA Httpd Error 500 (I R A Aggie)
Re: perl warning annoying me <qdtcall@esb.ericsson.se>
Quest for the Holy Perl: Bletch'ing makefile. (Casper K. Clausen)
Re: Running Unix from inside perl script <mak@mark.dircon.net>
Re: URL encoded <cs@zip.com.au>
using print "Location http://www.adress_of_url\n"; <PAYS@FILNET.fr>
Re: using print "Location http://www.adress_of_url\n"; (brian d foy)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 10 Nov 1997 09:07:04 GMT
From: periat@ens.ascom.ch (Periat Henri)
Subject: 'sort problem
Message-Id: <646iro$amv@ascomax.hasler.ascom.ch>
Hi everybody
I have a hash with 178'000 entries and sort it:
foreach $Key (sort keys %Hash) {
...
}
It works perfect, but uses a lot of memory, about 130 MByte.
Even when the program leaves the loop, it dosn't realease the memory.
How can i force a memory deallocation ?
Thanks
Henri
-----------------------------------------------------------------------
Henri Periat Phone: 0041 32 624 35 78
Ascom Business Systems AG E-Mail: periat@ens.ascom.ch
Dep. 3578 Fax: 0041 32 624 31 56
Ziegelmattstr. 1
CH-4503 Solothurn
Switzerland
-----------------------------------------------------------------------
------------------------------
Date: 10 Nov 1997 11:18:20 GMT
From: "James Richardson" <jamesr@aethos.co.uk>
Subject: Re: @ARGV Limits or Attempts to avoid "glob: Too many arguments" message
Message-Id: <01bcedca$75f071c0$26c0a4c1@kitkat.aethos.co.uk>
Jonathan Miller <tommyd@halcyon.com> wrote in article
<642pm7$p2k$1@brokaw.wa.com>...
>
> This is a limit of your shell, not PERL.
>
> A command line sent to a program from the shell can only be so long (not
> sure of the exact size). PERL will never see the "*", but rather the
shell
> expands (globs) the splat into a list of all the files in your directory.
Well, its OS dependent, but on Solaris its about 1000 files....
James
------------------------------
Date: 10 Nov 1997 12:11:52 GMT
From: Casper.Dik@Holland.Sun.Com (Casper H.S. Dik - Network Security Engineer)
Subject: Re: @ARGV Limits or Attempts to avoid "glob: Too many arguments" message
Message-Id: <casper.879164277@uk-usenet.uk.sun.com>
[[ Reply by email or post, don't do both ]]
"James Richardson" <jamesr@aethos.co.uk> writes:
>Jonathan Miller <tommyd@halcyon.com> wrote in article
><642pm7$p2k$1@brokaw.wa.com>...
>>
>> This is a limit of your shell, not PERL.
>>
>> A command line sent to a program from the shell can only be so long (not
>> sure of the exact size). PERL will never see the "*", but rather the
>shell
>> expands (globs) the splat into a list of all the files in your directory.
>Well, its OS dependent, but on Solaris its about 1000 files....
On Solaris the limit is 1 MB worth of @ARGV + %ENV, not 1000 files
(The maximum filename length is 1024, typical filenames are (much) shorter,
so "thousands of files" would be more accurate)
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
------------------------------
Date: Mon, 10 Nov 1997 07:13:47 -0500
From: "Richard G. Roberto" <robertor@typhoon.co.jp>
Subject: Another newbie network/sockets Q.
Message-Id: <Pine.LNX.3.96.971110065610.29163M-100000@dedlegend.nwmarkets.co.jp>
Hi,
I'm trying to get a handle on this stuff (no pun intended ;)
and I'm having a little bit of a hard time. I'm using
Advanced Perl Programming (Chpt. 12) as a guide into it, but
I have no "other" network programming background. I've
successfully implemented a non-blocking server using select
(instead of forking for every connection), but I'm confused
as to how to achieve bi-directional communications. I'm
trying (partially for the sake of learning, and partially to
get something done) to create a "server" that listens to
many, and occasionally responds to some. That means the
"client" needs to be able to initiate the conversation, but
also be able to listen to the server's response
(occasionally).
The book uses IO::Socket and IO::Select and that's the way
I'd rather do it too. Are there any examples of setting up
bidirectional communications using the IO:: stuff? I can
actually do without the IO::Select piece for the example as
I have a pretty good feel for that part already.
Also, I'm trying to set up a UDP broadcast socket but
I'm having trouble actually defining a handle (again using
IO::Socket).
The following code works, but doesn't leave me with a file
handle I can do stuff to/with like other file handles:
#!/usr/bin/perl
use IO::Socket::INET;
use diagnostics;
$host = "myhostname";
$port = "1998";
$s_main = new IO::Socket::INET ( LocalAddr => $host,
LocalPort => $port,
Proto => "udp",
);
die "socket creation failed, $!\n" unless ($s_main);
$s_main->sockopt(SO_BROADCAST,1);
$broadcast='1.2.3.255';
$targ = inet_aton ($broadcast);
$targaddr = sockaddr_in (1998, $targ);
$msg='This is a test\n';
$bytecount = $s_main->send($msg,0,$targaddr);
die "Error sending message: $!\n" unless (defined($bytecount));
print "broadcast $bytecount bytes on port $port.\n";
close ($s_main);
This sends $msg, but I'd rather be able to say
"print $handle". Is this possible?
Thanks a lot, in advance.
Cheers,
--
"Until we extend the circle of our compassion to all living
things, we will not ourselves find peace" -Albert Schweitzer
Richard G. Roberto
------------------------------
Date: Mon, 10 Nov 1997 02:42:34 -0600
From: crr026@email.mot.com
Subject: Being strict with filehandles!
Message-Id: <879133898.16187@dejanews.com>
Hi!
Just learning to use the strict directive, and of course a lot of my
scripts broke. I'm particularly stumped at one of them since the code is
almost taken word for word from the documentation.
#! perl -wT
use strict;
$main::Symbol = "FL";
$main::Handle = \*{$main::Symbol};
open $main::Handle, "Somefile" or die $!;
while (<$main::Handle>) { print; }
close $main::Handle;
It works when I'm not being "strict", but fails if I am. The complaint
reported is
# Can't use string ("FL") as a symbol ref while "strict refs" in use.
File 'Somescript.pl'; Line 6
Can some kind soul illuminate me on why being strict about filehandles
fails?
TIA!
Ramesh
***************************************************************
E-mail address in headers zapped to prevent spam! Please use
crr026@email.mot.com if replying directly.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 10 Nov 1997 00:57:47 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Being strict with filehandles!
Message-Id: <m34t5ljfck.fsf@windlord.Stanford.EDU>
crr026 <crr026@email.mot.com> writes:
> Just learning to use the strict directive, and of course a lot of my
> scripts broke. I'm particularly stumped at one of them since the code is
> almost taken word for word from the documentation.
> #! perl -wT
> use strict;
> $main::Symbol = "FL";
> $main::Handle = \*{$main::Symbol};
As a side note, why the $main:: stuff? I did that at first when using use
strict, but only because I didn't know about use vars. If you really do
intend a variable to be global, just declare it with use vars. If you
don't, then stick a "my" in front of it before you use it. The $main::
package identifier is just syntactic clutter you don't need.
The reason why use strict is complaining about this is that you're using
symbolic references (possibly without being aware that you're doing so).
You're assigning to $main::Handle a reference to the *FL typeglob, but
you're not directly making a reference to that typeglob. Instead, you're
creating a block, with { }, that returns the *string* "FL". Converting
strings into variable names is one of the things that's not allowed under
use strict, not because it isn't supported by Perl, but because it's a
fairly tricky thing to do and is often gotten wrong. It's also not
usually necessary.
Is there some particular reason in this case why you can't say:
$main::Handle = \*FL;
If there is, then you can wrap this code as such:
no strict 'refs';
$main::Handle = \*{$main::Symbol};
use strict 'refs';
Remember, use strict doesn't outlaw bad code; it outlaws a series of
advanced or easily misused features. There is perfectly legitimate code
that cannot be written under use strict, which is why there's a mechanism
for turning it on and off.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Mon, 10 Nov 1997 08:44:50 -0500
From: Walker Curtis <curtis@ei.kodak.com>
Subject: Re: Better Way in Perl
Message-Id: <34670FD2.4942A63@ei.kodak.com>
Hello,
Abigail wrote:
> Creede Lambard ($_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print) wrote on
> 1530 September 1993 in <URL: news:6413dh$oc3@bgtnsc03.worldnet.att.net>:
> ++
> ++ Walker Curtis wrote in message <34639803.A2960A9F@ei.kodak.com>...
> ++
> ++ <snip>
> ++
> ++ >The current best here is a 41 character perl hack that I came up with.
> ++ >
> ++ >perl -e 'for(<*>){`mv $_ $\``if/\.cin$/}'
> ++ >
> ++
> ++
> ++ But if you use this, doesn't it change 6.cin.cin to 6.cin, which the rules
> ++ say would be a Bad Thing?
> ++
> ++ I think you'd have to do something like
> ++
> ++ perl -e"for(<*>){/(\.cin){1}$/&&`mv $_ $\``}"
>
> The {1} is pointless, it still matches foo.cin.cin. If you don't want
> to match that, you'd need something else.
>
> Furthermore, you can save chars by using a map:
>
> perl -e'map{`mv $_ $\``if/\.cin$/}<*>'
Very Nice!
>
>
> Or ls, a pipe and -n:
>
> ls|perl -ne'/\.cin$/&&`mv $_ $\``'
Don't you need to strip the return on $_ to make this work?
>
>
> Or without perl:
>
> for f in *;do mv $f `basename $f .cin`;done
>
> Or:
>
> ls *|xargs -i mv {} `basename {} .cin`
This wouldn't work for me. I didn't take anytime yet to figure out why.
>
>
> Abigail
> --
> perl -wle 'print "Prime" if (1 x shift) !~ /^(11+?)\1+$/'
Thanks,
-wc
------------------------------
Date: Mon, 10 Nov 1997 08:49:58 -0500
From: Walker Curtis <curtis@ei.kodak.com>
Subject: Re: Better Way in Perl
Message-Id: <34671105.43EF8588@ei.kodak.com>
It would be correct behavior for 6.cin.cin to be renamed
to 6.cin. Sorry if this wasn't clear originally.
So far I see
perl -e 'map{`mv $_ $\``if/\.cin$/}<*>' (39 characters, perl 5.002 or
later)
ls|perl -ne '`mv $\`$& $\``if/\.cin$/' (38 characters)
ls|perl -ne '/\.cin$/&&`mv $\`$& $\``' (38 characters)
ls *.cin|sed 's/\(.*\)\..*/mv & \1/'|sh (39 characters)
Thanks to Zenin for calling this out!
ls|something
ls -1|something
FYI, the -1 is the default when used in a pipe, so this
is really only:
-wc
Walker Curtis wrote:
> I involved myself in a spirited competition to come up
> with the shortest one liner that could be run from the
> average tcsh,csh,ksh and sh shell.
>
> The idea is to come up with the shortest on line way to strip
> a '.cin' from each file in a directory containing
> thousands of files.
>
> There are files such as '.cin' '88cin' '4.cinn' '6.cin.cin' also
> in the directory. There can't be any errors here.
> There are also no aliases, custom programs, etc... being used.
>
> The current best here is a 41 character perl hack that I came up with.
>
> perl -e 'for(<*>){`mv $_ $\``if/\.cin$/}'
>
> The closest competition is a 42 character non-perl runner up.
>
> ls -1 *.cin|sed 's/\(.*\)\..*/mv & \1/'|sh
>
> Does someone know of a short way, white space counts.
>
> If someone has a real phenomenal answer, I'll send you a t-shirt.
>
>
> -wc
>
------------------------------
Date: Mon, 10 Nov 1997 06:19:42 GMT
From: wjin@cs.uh.edu (Woody Jin)
Subject: Book: Software Engineering With Perl (Opinion ?)
Message-Id: <6469lq$uvo$1@Masala.CC.UH.EDU>
Book: Software Engineering with Perl
Carl Dichter and Mark Pease
Prentice Hall, 1995. 304 pages, ISBN 013016965x
Any opinions about this book ?
Since it is published in 1995, it should be about just perl 4.
Thanks.
--
Woody
------------------------------
Date: 10 Nov 1997 00:46:19 -0500
From: Mark Mielke <markm@nortel.ca>
Subject: Re: By value or reference
Message-Id: <lq1k9ehgv2s.fsf@bmerhe83.nortel.ca>
Francois <leurmy@akula.com> writes:
> I have a While loop that reads the <STDIN>...and a @data_stream that
> gets the value from the form for each field.
>
> if ($field_name == "your_name") {
> $self{'your_name'} = join ("", @data_stream);
> } elsif ($field_name == "language") {
> $self{'language'} = join ("", @data_stream);
> } elsif ($field_name == "program_cb") {
> $self{'program_cb'} = join ("", @data_stream);
> }
>
> While I would expect each $self{'....'} variable to get different
> values, it seem s that they all have the same value.
You are using == (numeric compare) instead of eq (string compare)
Try:
if ($field_name eq "abc") { ... }
# etc...
hope this helps :-)
mark
-- _________________________
. . _ ._ . . .__ . . ._. .__ . . . .__ | Northern Telecom Ltd. |
|\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ | Box 3511, Station 'C' |
| | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, ON K1Y 4H7 |
markm@nortel.ca / al278@freenet.carleton.ca |_______________________|
------------------------------
Date: 10 Nov 1997 12:47:28 +0100
From: JVromans@Squirrel.NL (Johan Vromans)
Subject: Re: Command line options
Message-Id: <wl3200pkm27.fsf@plume.nl.compuware.com>
kchadha@hotmail.com writes:
> I want to do the following:
>
> runprogram.pl -tM1 -tM2
>
> and have an array/variable contain M1 and M2
This, and more, can be handled elegantly with the Getopt::Long module
that comes standard with Perl.
GetOptions ("t=s@")
and you'll get your results in (global) array @opt_t.
-- Johan
------------------------------
Date: Mon, 10 Nov 1997 08:45:27 -0600
From: Kermit Tensmeyer <kermit@ticnet.com>
Subject: Re: CPAN confusion
Message-Id: <34671E07.39AB0120@ticnet.com>
Honza Pazdziora wrote:
>
> hermit@cats.ucsc.edu (William R. Ward) writes:
>
> [...]
>
> > > It's not really a problem with CPAN since it already has the functionlity
> > > you request. If module authors use README files, or put more helpful
> > > information in their README's (such as the SYNOPSIS of the POD), then you
> > > would have the information that you want.
> >
> > I want to be able to see detailed information, not just the README.
> > Why ask authors to duplicate the POD contents in a README file when
> > the documentation itself could be made available?
>
> I believe (and try to do it that way in my modules) that the README
> should give you the idea, what's going on in the package. You can get
> on readme using
> perl -MCPAN -e shell
> and then
> readme modulename
and the assumption is that perl can connect to the CPAN site all on
it lonesome.. not a good assumption.
At work I sit behind a firewall. I can browse the CPAN site all I want
with a browser, but the CPAN module can not connect unless the perl
is socksified.
I doubt if the win32 version of perl can be used across the net
either.
so providing a pod-html or cgi interface to provided modules would be
a Good Thing. If done "right", then it could provide some method
to tell the difference between various versions as well.
>
> > > However, I disagree that detailed information, such as the entire
> > > manpage, should be made available on CPAN. One can simply download
> > > the module and run it through pod2man or another pod translator.
> >
> > That's asking an awful lot to find out whether a module does what I
> > want. I think having all the POD online and web-accessible would be a
> > very good thing.
>
> README should give you the idea. I do not think it is feasible to
> duplicate all the *.pms' pod out of the tar.gz's. It would take you
> a lot of space and all people mirroring CPAN -- even if you are
> welcome to set up a server that would extract the module's content
> and docs on the fly.
>
As I recall there are some amazing transformations of data formats
available in WuFTPD. Given the general nature of Perl, and the
integration of Perl with Httpd servers this should be a natural
enhancment of basic facility.
And no, most of the readme's associated with the Modules are
lacking in Detail. (but that's an Author problem)
[ for examples of how it _should_ be done look at the CGI.pm
or any of Graham Barr's IO modules. If they all were done
that way then this would be a no-brainer... ]
> Also, many people have more versions of one module in their authors'
> directory. Some of them are out of date, some of them are new betas --
> which documentation should be displayed?
How about on a per-module-per-version basis.
>
> > I think that CPAN is a good thing in general but I find that it is
> > awkward to use through the web (does anyone still use ftp clients
> > these days?) and could use some user interface improvements.
>
> perl -MCPAN -e shell
> should do what you need. I am also trying to write XCPAN that would
> give you more menus and clickable things, but it won't be ready soon
> since I am pretty short time :-(
>
If and only if you are using a Unix workstation on the bare network.
the rest of us are using different interfaces, Win32 NT, SSH, Netscape
etc.
Now if Perl code was easier to socksify...
> --
> ------------------------------------------------------------------------
> Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
> I can take or leave it if I please
> ------------------------------------------------------------------------
--
-------
Kermit Tensmeyer (E & T - Networking)
Kermit@ticnet.com Dallas
------------------------------
Date: 10 Nov 1997 14:30:50 GMT
From: rubin@quip.eecs.umich.edu (Aviel Rubin)
Subject: Distribution of perl for windows platforms
Message-Id: <6475qq$shi$1@news.eecs.umich.edu>
You may or may not have hear of our Crowds system. It is a system,
developed entirely in Perl, that lets users surf the web anonymously,
with some guarantees of privacy. See
http://www.research.att.com/projects/crowds
We have been distributing the system on Unix, and now we have a version
that runs on Windows 95/NT. However, unless people already have Perl,
they cannot run our system. So, we were wondering several things.
1. Is Malcom Beattie's compiler going to be included in the next release of
Perl that is due out this month? Is it really coming out soon?
2. Has anyone considered a self-extracting, self-installing distribution
of perl for windows, say perl.exe? Perhaps an Installshield version would
be best.
3. Is there any other way to target users who may not have tar or
gzip, and may not be that sophisticated, but who we still want
to have and use perl on their system? Is this a consideration any
of the lords of Perl have thought of?
Thanks for any information you have on this.
Avi
*********************************************************************
Aviel D. Rubin rubin@research.att.com
Secure Systems Research Dept. Adjunct Professor at NYU
AT&T Labs - Research
180 Park Avenue http://www.research.att.com/~rubin/
Florham Park, NJ 07932-0971 Voice: +1 973 360-8356
USA FAX: +1 973 360-8809
--> Check out http://www.clark.net/pub/mjr/websec/ for a new
book on web security (The Web Security Sourcebook).
*********************************************************************
------------------------------
Date: 09 Nov 1997 22:28:27 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: FileHandles
Message-Id: <m3sot5l0tw.fsf@windlord.Stanford.EDU>
David Corcoran <corcordt@cs.purdue.edu> writes:
> $tmp = new IO::Handle;
> $remote = accept($tmp,MY_SOCKET);
> I have tried this but am having problems printing to $tmp such as.
> print $tmp "hello world\n";
What error messages do you get?
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Mon, 10 Nov 1997 05:58:05 +0000
From: Jong <jong@mrc-lmb.cam.ac.uk>
Subject: Geanfammer Perl program announcement (biological)
Message-Id: <3466A26D.2781@mrc-lmb.cam.ac.uk>
subject: Geanfammer package: protein fam maker for genomic seq.
analysis
Geanfammer
It can be used for analysing large sequence db or complete
genomes etc.
The www page is:
http://www.mrc-lmb.cam.ac.uk/genomes/geanfammer.html
The authors (Sarah A. Teichmann and J. Park ) will be
pleased to get criticisms, bug reports, and improvement
suggestions.
Thanks,
The geanfammer authors
---------------------------------------------------------
Let's support Free Software Foundation.
http://www.gnu.ai.mit.edu/help/donate.html#BecomeAPatronOfTheFSF
http://www.mrc-lmb.cam.ac.uk:80/genomes/jong/copyleft.html
------------------------------
Date: 10 Nov 1997 07:44:56 GMT
From: <shiloh@shell9.ba.best.com>
Subject: Re: HELP NEEDED: Why won't my script work?
Message-Id: <646e1o$b7v$3@nntp1.ba.best.com>
Martien Verbruggen <mgjv@comdyn.com.au> wrote:
: Why did you uuencode this? It's sort of hard to read this way.
I was able to make out a couple of nested "if" statements I think ;)
--Joe McCaughan | The blessing of the Lord makes one rich,
shiloh@best.com | And He adds no sorrow with it. Proverbs 10:22
------------------------------
Date: Mon, 10 Nov 1997 08:16:23 -0800
From: EDP Contract Services <edpbala@fast.net>
Subject: Jobs -Pa.
Message-Id: <34673357.CA0@fast.net>
Several of our clients are looking for C/UNIX and PERL Programmers.
RDBMS is required. These are fortune 100 and 500 companies. The
environment for most of these opportunities is pharmaceutical based.
Rates will be commensurate with experience and several of
these positions are contract to hire. For immediate consideration,
please forward your resume with references now! Email to
attn:JM1 at edp@fast.net (MS WINWord6 or ascii)
or fax to attn:JM1 at 610 667 8735.
For complete list of current openings, please visit our
Bala Cynwyd, PA. website at
http://edpcs.com/bin/search.pl?edp403
***ALL POSITIONS WILL REQUIRE AT LEAST 2YRS. PAID U.S./POST
ACADEMIC EXPERIENCE THAT WE CAN REFERENCE****
EDP Contract Services
401 City Line Ave
Bala Cynwyd, PA.
610 667 2990
610 667 8735 FAX
edpbala@fast.net
------------------------------
Date: 10 Nov 1997 07:48:30 GMT
From: devesh@numbat.cs.rmit.EDU.AU (devesh)
Subject: NCSA Httpd Error 500
Message-Id: <646e8e$m45$1@goanna.cs.rmit.edu.au>
Hi,
I Have written a software using Apache Web server. The software when ported to
another m/c running NCSA Web server gives the following error for some cgi scrip
ts when called from Web browser
HTTPd: malformed header from script /u/d/devesh/tmp/cgi-bin/hello1.pl
The scripts run fine on command prompt. I have no clue, is it a server configrat
ion problem or what. I am using cgi-lib.pl library.
Even the simple code like this gives the same error
-----
#!/usr/bin/perl
require ("cgi-lib.pl");
&ReadParse (*input);
print &PrintHeader;
print <<"end";
<HTML><BODY>blah blah blah</BODY></HTML>
end
-----
I am using NCSA httpd version 1.5.1
Any suggestions????
Thanxs,
devesh
--
**********************************************
devesh Jain
13/150 alma rd.
------------------------------
Date: Mon, 10 Nov 1997 09:45:53 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: NCSA Httpd Error 500
Message-Id: <-1011970945530001@aggie.coaps.fsu.edu>
In article <646e8e$m45$1@goanna.cs.rmit.edu.au>,
devesh@numbat.cs.rmit.EDU.AU (devesh) wrote:
+ I am using cgi-lib.pl library.
+ Any suggestions????
Go to perl v5, and use the CGI.pm module instead of cgi-lib.pl. In my
experience, cgi-lib.pl can be flakey.
James
--
Consulting Minister for Consultants, DNRC
Support the anti-Spam amendment <url:http://www.cauce.org/>
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>
------------------------------
Date: 10 Nov 1997 14:42:38 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: perl warning annoying me
Message-Id: <isiuu0kgq9.fsf@godzilla.kiere.ericsson.se>
doj <doj@cubic.org> writes:
> warning: setlocale(LC_CTYPE, "") failed.
> warning: LC_ALL = "(null)", LC_CTYPE = "(null)", LANG = "ko",
> warning: falling back to the "C" locale.
Note: *All* your programs have problems with broken locales, it's just
that (nearly) none but Perl actually complains about it.
> now these annoy me to hell.
> Question: how can I get rid of these warnings ???
Install locale definitions for locale "ko". RedHat comes with the
necessary programs, but not the data... You can also set the LANG
variable to "C" (or nothing), which will make the complaints go away.
It will also make Perl sort and upper/lowercase your strings according
to US ASCII, which may not be what you want.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esavionics.se http://www.lysator.liu.se/~calle/
------------------------------
Date: 10 Nov 1997 12:07:10 +0100
From: ckc@dmi.min.dk (Casper K. Clausen)
Subject: Quest for the Holy Perl: Bletch'ing makefile.
Message-Id: <wvp67q1qa75.fsf@hobbes.dmi.min.dk>
Greetings, fellow knights.
I recently posted a plea for help, since my quest had led me two a
two-headed makefile-monster, which kept on babbling. With the help of
a recent version of GNU make, I have conquered the monster and
continued my quest. My quest, needless to say, is for the most recent
incarnation of the Holy Perl, namely version 5.004_04.
I am now in dire straits again, and must once more request your
help. It appears that some malignant party has hexed my 'makefile'
(yes, that's a lower-case 'm'), causing it to contain the line:
config.h: Bletch: How does this C preprocessor catenate tokens?
This, of course, greatly confuses my valiant helper, GNU make.
My question: Who has hexed my makefile, and which incantation will
counter this foul magic?
Many thanks,
Sir Kvan, on a Quest for the Holy Perl.
--
-------Casper Kvan Clausen------ | 'Ah, Warmark, everything that passes
----------<ckc@dmi.dk>---------- | unattempted is impossible.'
Lokal 544 |
I do not speak for DMI, just me. | - Lord Mhoram, Son of Variol.
------------------------------
Date: Mon, 10 Nov 1997 07:53:11 +0000
From: Mark Morgan <mak@mark.dircon.net>
Subject: Re: Running Unix from inside perl script
Message-Id: <3466BD66.1717C620@mark.dircon.net>
James Juran wrote:
> tbergman@tkb.com wrote:
>
> > I am attempting to interact with the telnet program from within a perl
> > program. The task is simply to verify a list of email addresses at a
> > particular domain. Perl provides facilities to pipe input either from or
> > to a unix program. I can get the perl program to launch telnet with a
> > command such as:
> >
> > open (IN,"telnet somewhere.com 25 |");
> > while (<IN>){
> > print "$_";
> > }
> >
> > This captures the output of the telnet program and prints it to the
> > screen. At this point I get stuck. I cannot seem to send any additional
> > strings to the telnet program. I have tried to open additional handles. I
> > have tried to use the backquote mechanism to execute a command in
> > unix--but to no avail. Can you tell me how to send additional information
> > to the active telnet session. I need to perform some processes between
> > strings sent that depend on the output I am getting from the telnet
> > session, e.g. save good addresses to another file, get the next address,
> > etc.
> >
>
> You might want to check out the Net::Telnet module. It should be
> somewhere under http://www.perl.com . IMHO, it's significantly easier
> to use than using telnet as a shell process and trying to read its
> output.
>
> James Juran
> jrj120@psu.edu
Or, considering you're trying to check on validity of email addresses, you
should instead use Net::SMTP. This allows you to use the VRFY command, to
check if an email is valid(not supported by many servers though).
Mark.
------------------------------
Date: 10 Nov 1997 05:25:31 GMT
From: Cameron Simpson <cs@zip.com.au>
To: Andrew Nicholson <anichols@sprynet.com>
Subject: Re: URL encoded
Message-Id: <19971110172136-cameron-1-02090@sid.research.canon.com.au>
Andrew Nicholson <anichols@sprynet.com> writes:
| Using a Content-type of applications/x-www-form-urlencoded, new lines
| are coded as %0D%0A. I find little decipherable documentation dealing
| with this particularity.
This is the normal escape mechanism: %xx is the character repesented by the
two hex digits xx. This %0D%0A is 13 10 which is CR LF, which is end of line.
| Can anybody provide the ascii translation for
| these charectors. For that matter, how about all charectors with an
| ascii value less than 32 on you typical home PC?
As if ASCII values are different on other machines!
--
Cameron Simpson, DoD#743 cs@zip.com.au http://www.zip.com.au/~cs/
stomping on roses and strangling kittens
leaving no fingerprints cause we wear mittens
inflatable prostitutes tied up with strings
these are a few of my favorite things
- gypsy <gypsy@popeet!c3.com>
------------------------------
Date: Mon, 10 Nov 1997 11:19:37 GMT
From: "Olivier" <PAYS@FILNET.fr>
Subject: using print "Location http://www.adress_of_url\n";
Message-Id: <01bcedc9$876cdfc0$0c07000a@dns1.filnet.fr>
Please could you tell me if a daclaration is necessary to use
print ""Location http://www.adress_of_url\n";
using perl 5
with an example if it is possible
Olivier R.
pays@filnet.fr
------------------------------
Date: Mon, 10 Nov 1997 08:56:25 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: using print "Location http://www.adress_of_url\n";
Message-Id: <comdog-ya02408000R1011970856250001@news.panix.com>
In article <01bcedc9$876cdfc0$0c07000a@dns1.filnet.fr>, "Olivier" <PAYS@FILNET.fr> wrote:
>Please could you tell me if a daclaration is necessary to use
>print ""Location http://www.adress_of_url\n";
>using perl 5
>with an example if it is possible
declaration of what? you can print anything you want without asking
permission.
are you having some sort of problem?
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
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 1295
**************************************