[7447] in Perl-Users-Digest
Perl-Users Digest, Issue: 1072 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 24 14:18:00 1997
Date: Wed, 24 Sep 97 11:00:23 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 24 Sep 1997 Volume: 8 Number: 1072
Today's topics:
Re: '0': string or number? you make the call! (Andrew M. Langmead)
Creating quick text index of words <mystery@itis.com>
Re: Ctrl-D can not works in Perl5 for Win95 (Terry Michael Fletcher - PCD ~)
Re: EOF problem? (Matthew Cravit)
expect lib for perl? <gcancio@mail.cern.ch>
Re: Getting backreferences from global pattern match? (Sean McAfee)
Re: Getting backreferences from global pattern match? (Mike Stok)
Re: Getting Started <jdavie2@umbc.edu>
Re: HELP How do I use perl <doug@3dlabs.com.remove>
Learning Perl (chap 2 q 4); I'm confused <daanth@unx.sas.com>
Re: Learning Perl (chap 2 q 4); I'm confused <doug@tc.net>
MIME Header "Location:" <smaese@csolutions.net>
Re: pack question <rootbeer@teleport.com>
Re: Perl and Informix-SQl <jon@quantumsi.com>
Re: perl mail on solaris <rootbeer@teleport.com>
Re: perl under win95 problem <rootbeer@teleport.com>
Re: Regular Expressions: Negating bracketed strings <rootbeer@teleport.com>
Re: require 'sys/socket.ph' <rootbeer@teleport.com>
Re: require 'sys/socket.ph' (Matthew Cravit)
Re: require 'sys/socket.ph' <rootbeer@teleport.com>
Tainting and fastcwd/cwd (Marc A. Selig)
Re: undump for Linux (Matthew Cravit)
Re: Unlist syntax (Andrew M. Langmead)
Re: Unlist syntax (Andrew M. Langmead)
USENIX Conference on Domain-Specific Languages (DSL) (Jackson Dodd)
Re: UserName Info <rootbeer@teleport.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 24 Sep 1997 16:06:01 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: '0': string or number? you make the call!
Message-Id: <EH0sq1.2s9@world.std.com>
bart.mediamind@tornado.be (Bart Lateur) writes:
>Andreas Schmidt <andi@team-konzept.de> wrote:
>>In perl there are no datatypes like integer or string, they all are just
>>scalars. So there is no difference between assigning 0 or '0'.
>All very nice. But it has the very nasty consequence that the most used,
>and most typical Perl construct is buggy:
> while(<>) { ... }
A while ago (but not long enough ago, sometime after the Llama book
was first published) The default action of <> inside a while loop was
changed. It used to be magic for:
while($_ = <ARGV>) { ... }
(with the extra code to set $ARGV from @ARGV and open ARGV from $ARGV)
But now it is:
while(defined($_ = <ARGV>)) { ... }
Files consisting of "0" as the entire last line no longer end the
loop. "0" is a boolean false, but it is still defined. <> returns
undef on end of file.
--
Andrew Langmead
------------------------------
Date: Wed, 24 Sep 1997 13:00:14 -0400
From: Prince Mystery <mystery@itis.com>
Subject: Creating quick text index of words
Message-Id: <3429471E.86F32E3A@itis.com>
Hi,
I'm hoping to create a method that is going to be accessed by a bunch of
different perl scripts for the purpose of adding word indexes to a
pre-exisiting datbase of words.
What I'm worried about is what I should be ignoring. I'm trying to
index textual input from a user, and the field may contain such
non-essentials as "a","and","the", and so on.
Is there a definitive list of non-essential words somewhere?
Myst
--
Version: 2.6.2
owEBiAB3/4kAdQMFADPY9d1hGXgCUdEssQEBvREDAJodjyXMMZnOxrzl6Z5Anldh
p/mCNLshfYr/aLB+vmR2CrdySGCqBZFg+GanInyn/Vg6oRNoLgM/sU5+sbYntGt1
nI2B8/PZIDxOTA3S6BktLawONN/RGcqjPhDPm8l636wOYgh0ZXh0ZmlsZQAAAAA=
=beaq
-----END PGP MESSAGE-----
------------------------------
Date: 24 Sep 1997 16:16:31 GMT
From: tfletche@pcocd2.intel.com (Terry Michael Fletcher - PCD ~)
Subject: Re: Ctrl-D can not works in Perl5 for Win95
Message-Id: <60becv$if3$1@news.fm.intel.com>
Herman (herman-law@usa.net) so eloquently and verbosely pontificated:
>
> Can anybody tell me why and how can I terminated the input besides pressing
> Ctrl-D in Chinese Win95/English Win95?
use Ctrl-Z (i mean ^Z) instead. you might need to follow that with the
return key also.
--
"Give me ambiguity or give me something else."
______ ______ _ _
(_) | (_) | | | | |
| _ ,_ ,_ _|_ | | _ _|_ __ | | _ ,_
_ ||/ / | / | | | / | ||/ |/ | / |/ \ |/ / |
(_/ |__/ |_/ |_/ \_/|/ (_/ |__/|__/|_/\___/| |_/|__/ |_/
*+*+*+*+*+*+*+*+*+*+*+* /| *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
\| tfletche@pcocd2.intel.com
*+*+*+*+*+ Views expressed...not INTeL's...yadda yadda yadda.... *+*+*+*+*+*
------------------------------
Date: 24 Sep 1997 09:30:50 -0700
From: mcravit@best.com (Matthew Cravit)
Subject: Re: EOF problem?
Message-Id: <60bf7q$q4h$1@shell3.ba.best.com>
[Courtesy Cc to cited poster by email]
In article <60b8fr$6vb$1@gamera.cbl.umces.edu>,
Fleet Teachout <fleet@cbl.umces.edu> wrote:
>
>w3:~> perl -w newlogs.pl
>Missing right bracket at newlogs.pl line 66, at end of line
>syntax error at newlogs.pl line 66, at EOF
>Execution of newlogs.pl aborted due to compilation errors.
>w3:~>
>
>Line 66 consists entirely of a right curly brace '}' that defines the end
>of a sub - and is the last line in the script.l
Helpful hint: when asking for help debugging your code, it's usually
helpful to post some of your code. Since none (well, very few, anyway :>)
of us are mind-readers, it would be very difficult for us to help you
debug your code without seeing some of it.
That being said, generally speaking, this kind of error message is a tip-off
that you have an unbalanced brace somewhere in your script. By this I mean
that you've done something like this:
sub foo { # This is the first left-brace
while (1) { # This is the second one
DoSomething;
} # This matches the second left brace, and nothing matches the first
A good debugging technique, which is made easier by an editor which can
highlight matching braces, is to start at the line where you got the error
and work your way backwards, making sure that each closing brace you
encounter matches the correct opening brace. (If you've isolated the error
to a specific subroutine, you can start at the beginning of that subroutine
and work your way forward, too.)
If that doesn't help solve your problem, you might be able to get more luck
by posting a relevant section of your code.
Hope this helps.
/MC
--
Matthew Cravit, N9VWG | Experience is what allows you to
E-mail: mcravit@best.com (home) | recognize a mistake the second
mcravit@taos.com (work) | time you make it.
------------------------------
Date: Wed, 24 Sep 1997 15:53:36 GMT
From: German Cancio Melia <gcancio@mail.cern.ch>
Subject: expect lib for perl?
Message-Id: <Pine.GSO.3.95a.970924175050.8530l-100000@asis-w3>
Hello,
does anybody know if there's a 'expect' equivalent or similar lib for
perl?
thank you very much,
German Cancio
------------------------------------------------------
German Cancio Melia IT - DIS CERN - 1211 Geneve 23
Phone: +41 2276 79801 mail: German.Cancio@cern.ch
------------------------------------------------------
------------------------------
Date: 24 Sep 1997 16:52:45 GMT
From: mcafee@gorf.rs.itd.umich.edu (Sean McAfee)
Subject: Re: Getting backreferences from global pattern match?
Message-Id: <60bggt$sm1$1@newbabylon.rs.itd.umich.edu>
In article <609lon$5hn@news-central.tiac.net>,
Mike Stok <mike@stok.co.uk> wrote:
>In article <609e7r$fcs$1@newbabylon.rs.itd.umich.edu>,
>Sean McAfee <mcafee@battlezone.rs.itd.umich.edu> wrote:
>>I have a file containing lines of the form:
>>A:abc B:xyz A:123 B:456 A:foo B:bar ...
>>...where the A, B pair can repeat an arbitrary number of times. I want to
>>extract the strings after the colon in each pair and store them in arrays
>>@A and @B. This doesn't work:
>>while (/A:(\S+) B:(\S+)/g) {
>> push(@A, $1);
>> push(@b, $2);
>>}
>>$1 and $2 are apparently never set, as I get only null strings in @A and
>>@B (although I do get the correct *number* of null strings). I can't find
>>any reason in the docs why this should be so. Can anyone shed some light
>>on the situation for me? Thanks in advance.
>Is that really what your code says? In the debugger I can do this:
> DB<1> $line = 'A:abc B:xyz A:123 B:456 A:foo B:bar'
> DB<2> while ($line =~ /A:(\S+) B:(\S+)/g) { push @A, $1; push @B, $2; }
> DB<3> X A
>@A = (
> 0 'abc'
> 1 123
> 2 'foo'
>)
> DB<4> X B
>@B = (
> 0 'xyz'
> 1 456
> 2 'bar'
>)
>... maybe there's another match operation between the condition of the
>while and the pushes?
>Can you post a segment of your code "unsimplified" for us to see?
My code was eventually going to look like what I posted above. To reassure
myself that it worked, I entered this on the command line:
perl -ne 'while (/A:(\S+) B:(\S+)/g) { print "'$1', '$2'\n"; }'
...and then I fed it this line:
A:abc B:xyz A:123 B:789 A:aaa B:bbb
The output was this:
,
,
,
The same script, without single quotes around $1 and $2 in the print
statement, works as expected. (I suppose the fact that no single quotes at
all appeared in the output should have set off the warning bells.) Why
would the single quotes affect the output like this? At first I thought
that the interpreter might be interpreting the quote following each number
as indicating a package name, but subsequent experimentation showed that
Perl doesn't allow numeric package names. In any event, the single quote
preceding the dollar sign should be making it to stdout, shouldn't it?
--
Sean McAfee | GS d->-- s+++: a25 C++ US+++$ P+++ L E- W+ N++ |
| K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ | mcafee@
| R+ tv+ b++ DI++ D+ G e++>++++ h- r y+>++** | umich.edu
------------------------------
Date: 24 Sep 1997 17:05:31 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Getting backreferences from global pattern match?
Message-Id: <60bh8r$qnl@news-central.tiac.net>
In article <60bggt$sm1$1@newbabylon.rs.itd.umich.edu>,
Sean McAfee <mcafee@gorf.rs.itd.umich.edu> wrote:
>My code was eventually going to look like what I posted above. To reassure
>myself that it worked, I entered this on the command line:
>
>perl -ne 'while (/A:(\S+) B:(\S+)/g) { print "'$1', '$2'\n"; }'
>
>...and then I fed it this line:
>
>A:abc B:xyz A:123 B:789 A:aaa B:bbb
>
>The output was this:
>,
>,
>,
>
>The same script, without single quotes around $1 and $2 in the print
>statement, works as expected. (I suppose the fact that no single quotes at
>all appeared in the output should have set off the warning bells.) Why
>would the single quotes affect the output like this? At first I thought
>that the interpreter might be interpreting the quote following each number
>as indicating a package name, but subsequent experimentation showed that
>Perl doesn't allow numeric package names. In any event, the single quote
>preceding the dollar sign should be making it to stdout, shouldn't it?
The shell is doing you in with that command line:
perl -ne 'while (/A:(\S+) B:(\S+)/g) { print "'$1', '$2'\n"; }'
^------------------------------------^ ^--^ ^------^
the ^---^ bits are what get quoted by a typical shell, and $1 and $2
probably get interpolated to nothing. For example:
[mike@stok mike]$ echo 'while (/A:(\S+) B:(\S+)/g) { print "'$1', '$2'\n"; }'
while (/A:(\S+) B:(\S+)/g) { print ", \n"; }
so you're probably getting 3 of ", \n"
That's why I usually work in the debugger (perl -de 1) or with small
scripts as I often forget shell oddities.
[mike@stok mike]$ perl -ne 'while (/A:(\S+) B:(\S+)/g) { print "!$1!, !$2!\n"; }'
A:abc B:xyz A:123 B:789 A:aaa B:bbb
!abc!, !xyz!
!123!, !789!
!aaa!, !bbb!
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com | Pencom Systems Administration (work)
------------------------------
Date: Wed, 24 Sep 1997 11:36:17 -0400
From: Jim Davies <jdavie2@umbc.edu>
Subject: Re: Getting Started
Message-Id: <34293371.4014@umbc.edu>
Mike,
You can use the perl grep to isolate the TAG that you are interested
in. For example:
#
# assuming that the tag is the progname
#
use File::Basename;
$tag=basename($0);
#
# open file and get the interested information then close file
#
open(FILE,"parmfile") or die "Cannot open parm file - error=[$!]\n";
my(@tags)=grep(/^\s*$tag:/,<FILE>); # perl regular expressions are
great!
close(FILE); # all of the interested tags are in memory (@tags)
#
# now strip off the tag and set the environmental variable
#
foreach $line (@tags)
{
#
# use pattern matching to find and set fields
#
$ENV{$1}=$2 if($line =~ /\s*$tag:\s*(\w+)\s+(\w+)/);
}
The above example will pull out environmental variables and contents
composed strictly of one or more word characters. If you need more than
that convert the areas in the parenthesis to character classes. For
example is you also would include the character ':' then this should
become ([\w:]+). Note: word (\w) is any alphanumeric or _ character (ie
\w is equivalent to [a-zA-Z0-9_]. Good luck.
Jim
Michael Bendorf wrote:
>
> Hello All,
>
> I am just getting started on my first Perl programs. I have all the
> usual books "Programming Perl" etc. And I am now starting to write my
> own stuff. Of course, right out of the gate I have found something I
> want to do, that I can't figure out.
>
> I have a Parm file I want to use for about 30 different programms.
> These programs will be revisions to Korn Shell Scripts that I have
> written over the past year or so.
>
> The Parm file is formatted like this.
>
> TAG:VAR VALUE
>
> where TAG is the name of a program, VAR is the variable I want to store
> VALUE in.
>
> In my shell scripts I used a combo of grep and awk to pull these values
> in to the script. In Perl, I see this sample in the beginning of the
> "Learning Perl" book but I am still missing something.
>
> 1) I want to read all the values of type TAG into a temp file, stripping
> the TAG: part off as the values are moved to the file.
>
> 2) I am guessing that I would then treat the temp file as an associative
> array and pull each VAR in assign the VALUE to VAR and move on.
>
> Questions:
>
> How do I strip off TAG:?
>
> How do I handle the assignment of VALUE to VAR?
>
> I would like to make this as generic as possible, so that I do not need
> to know ahead of time how many VARs there actually are prior to running
> the program.
>
> Thanks in Advance,
>
> Mike Bendorf
> mbendor@nmhs.org
>
> p.s. Hope my rambling is not too confusing.
------------------------------
Date: 24 Sep 1997 16:39:04 GMT
From: "Doug" <doug@3dlabs.com.remove>
Subject: Re: HELP How do I use perl
Message-Id: <01bcbd3d$2cfa7f00$d9d880c1@doug-laptop.3dlabs.com>
There is lots of info at
http://www.perl.com
Doug
shresthm <mochans@homemail.com> wrote in article
<34281DB0.48F9@homemail.com>...
> I have absoluely no idea how to get started on perl. I made a pl file,
> made it executible by the chmod parameter, and then what the hell am I
> supposed to do. I have the 1st. edition of the Ilama book, and I
> couldn't find the answer to it. I thought I could write some CGI stuff
> with perl, but I have no idea how it works. I tried to open the file
> with Netscape and it treated the .pl file that I had written as a text
> file and showed the source. What the hell am I supposed to do now?
>
------------------------------
Date: Wed, 24 Sep 1997 14:57:54 GMT
From: Dana Anthony <daanth@unx.sas.com>
Subject: Learning Perl (chap 2 q 4); I'm confused
Message-Id: <34292A72.3DCE@unx.sas.com>
Why does this work:
print "Type a number: ";
$number = <STDIN>;
print "Type a phrase: ";
$phrase = <STDIN>;
$C = ($phrase x $number);
print $C;
and this doesn't:
print "Type a number: ";
$number = <STDIN>;
print "Type a phrase: ";
$phrase = <STDIN>;
print ($phrase x $number);
but returns this error:
Can't call method "x" without a package or object
reference at list1.perl line 6, <STDIN> chunk 2.
--
Dana Lynne Goldblatt Anthony
Internet Publications Technology at SAS Institute
World Headquarters Cary, NC, USA
------------------------------
Date: 24 Sep 1997 13:20:58 -0400
From: Douglas McNaught <doug@tc.net>
To: Dana Anthony <daanth@unx.sas.com>
Subject: Re: Learning Perl (chap 2 q 4); I'm confused
Message-Id: <m2d8lyocg5.fsf@ono.tc.net>
[mailed and posted]
Dana Anthony <daanth@unx.sas.com> writes:
> Why does this work:
[...]
> and this doesn't:
>
> print "Type a number: ";
> $number = <STDIN>;
> print "Type a phrase: ";
> $phrase = <STDIN>;
> print ($phrase x $number);
>
> but returns this error:
>
> Can't call method "x" without a package or object
> reference at list1.perl line 6, <STDIN> chunk 2.
Works for me.
ono:~ [1083] $ perl
print "Type a number: ";
$number = <STDIN>;
print "Type a phrase: ";
$phrase = <STDIN>;
print ($phrase x $number);
Type a number: 5
Type a phrase: foo bar baz
foo bar baz
foo bar baz
foo bar baz
foo bar baz
foo bar baz
You have mail in /var/spool/mail/doug
ono:~ [1084] $ perl -v
This is perl, version 5.003 with EMBED
built under linux at Oct 18 1996 10:17:50
+ suidperl security patch
-Doug
--
sub g{my$i=index$t,$_[0];($i%5,int$i/5)}sub h{substr$t,5*$_[1]+$_[0],1}sub n{(
$_[0]+4)%5}$t='encryptabdfghjklmoqsuvwxz';$c='fxmdwbcmagnyubnyquohyhny';while(
$c=~s/(.)(.)//){($w,$x)=g$1;($y,$z)=g$2;$w==$y&&($p.=h($w,n$x).h($y,n$z))or$x==
$z&&($p.=h(n$w,$x).h(n$y,$z))or($p.=h($y,$x).h($w,$z))}$p=~y/x/ /;print$p,"\n";
------------------------------
Date: 24 Sep 97 16:14:01 GMT
From: "S. Steven Maese" <smaese@csolutions.net>
Subject: MIME Header "Location:"
Message-Id: <01bcc905$64545880$0a7a36d1@ws1.csolutions.net>
I'm new to PERL, sorry if this is a more than obvious question, but....
sub redir {
print "Location: http://www.csolutions.net/index.html\n\n";
}
The above code is intended to redirect a browser to the above listed web
page. This works with IE 3.02, but with Navigator 4.01 I get "Document
contains no data." Any ideas?
Thanks,
S. Maese
------------------------------
Date: Wed, 24 Sep 1997 09:07:49 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: "Trudno zhit' v derevne bez nagana." <alex@kawo2.rwth-aachen.de>
Subject: Re: pack question
Message-Id: <Pine.GSO.3.96.970924090431.6383Q-100000@usertest.teleport.com>
On 23 Sep 1997, Trudno zhit' v derevne bez nagana. wrote:
> pack ('C' . ('xC' x $length)), (2 * $length), (split //, $_[0]);
Writing it this way may make it clear what's happening:
pack('C' . ('xC' x $length)),
(2 * $length),
(split //, $_[0]);
If it looks like a function, it is a function. That is, you're calling
pack() with the args on the first line, then throwing the result away by
using the comma operator. Then you calculate and discard (2 * $length). I
think you want to use parens to wrap all of those items as arguments to
pack(). Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Wed, 24 Sep 1997 09:12:05 -0700
From: Jon Strabala <jon@quantumsi.com>
Subject: Re: Perl and Informix-SQl
Message-Id: <34293BD4.41C67EA6@quantumsi.com>
Nobody wrote:
>
> Hi there,
>
> I'm using perl with isql for a CGI program. I like to know if there is a
> variable that I can use if the sql is performed correctly.
>
> Raymond
I assume isqlperl (v 4.036) the variable is $isql_code
FYI we sell a perl5 port of isqlperl as a dynamic load
module ISQL.pm which a superset of functions - old code
works great just add ISQL.pm and your off, but new features
like unload and load with duplicate handeling exist.
- Jon
------------------------------
Date: Wed, 24 Sep 1997 08:55:46 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: John Armsby <jaws@atl.mindspring.com>
Subject: Re: perl mail on solaris
Message-Id: <Pine.GSO.3.96.970924085512.6383O-100000@usertest.teleport.com>
On Tue, 23 Sep 1997, John Armsby wrote:
> my $Mailto="jaws@mindspring.com";
Is that really what your code has? Doesn't Perl tell you to do something
about that? :-)
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Wed, 24 Sep 1997 09:10:48 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Felix Ng <felixng@china.com>
Subject: Re: perl under win95 problem
Message-Id: <Pine.GSO.3.96.970924091009.6383R-100000@usertest.teleport.com>
On Wed, 24 Sep 1997, Felix Ng wrote:
> Everytime i run (perl my.pl) the program will seek my floppy drive first
> before giving me the result.... why and how to solve ?
Almost certainly, there's something in the registry which references A:
unnecessarily. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Wed, 24 Sep 1997 08:59:30 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: John Edwards <jde@tomedii.demon.co.uk>
Subject: Re: Regular Expressions: Negating bracketed strings
Message-Id: <Pine.GSO.3.96.970924085622.6383P-100000@usertest.teleport.com>
On Tue, 23 Sep 1997, John Edwards wrote:
> I want to find every occurrence of ABC _not_ followed by XX\d+
/ABC(?!XX\d+)/
Is that what you want?
> (e.g. ABCXX123 is fine, ABCXY123 is not).
That sounds backwards from what I just did... Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Wed, 24 Sep 1997 09:21:00 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Benarson Behajaina <Benarson.Behajaina@swh.sk>
Subject: Re: require 'sys/socket.ph'
Message-Id: <Pine.GSO.3.96.970924091946.6383S-100000@usertest.teleport.com>
On Wed, 24 Sep 1997, Benarson Behajaina wrote:
> require 'sys/socket.ph'
'use Socket' instead. The command 'perldoc Socket' should tell you all
about it. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 24 Sep 1997 09:24:01 -0700
From: mcravit@best.com (Matthew Cravit)
Subject: Re: require 'sys/socket.ph'
Message-Id: <60ber1$mib$1@shell3.ba.best.com>
In article <3428E34F.D2D8E9D7@swh.sk>,
Benarson Behajaina <Benarson.Behajaina@swh.sk> wrote:
>I'm running Perl version 5.004_01 on Solaris 2.5.
>I couldn't run the following script (cache-compare.pl) :
>
>#!/usr/local/bin/perl
>require 'sys/socket.ph'
Try
use Socket;
instead. The *.ph files were primarily used in older versions of Perl, and
their use is somewhat deprecated now for instances where other Perl modules
export the required constants.
/MC
--
Matthew Cravit, N9VWG | Experience is what allows you to
E-mail: mcravit@best.com (home) | recognize a mistake the second
mcravit@taos.com (work) | time you make it.
------------------------------
Date: Wed, 24 Sep 1997 10:30:25 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Thad Welch <tw36027@glaxowellcome.com>
Subject: Re: require 'sys/socket.ph'
Message-Id: <Pine.GSO.3.96.970924102726.6383Y-100000@usertest.teleport.com>
On Wed, 24 Sep 1997, Thad Welch wrote:
> Benarson Behajaina wrote:
> > require 'sys/socket.ph'
> try
>
> require "sys/socket.ph";
That's not going to make any useful difference. Do you think there's some
undocumented ability of require() to tell whether its arguments were once
contained in double quotes? :-) I wonder what this would do...
require 's' . "ys/" . q(soc) . 'ket.ph'; # :-)
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 24 Sep 1997 18:28:22 +0200
From: selig@zv.fhg.de (Marc A. Selig)
Subject: Tainting and fastcwd/cwd
Message-Id: <j567rq65i1.fsf@zv.fhg.de>
Hello!
Why is the return value of the cwd function (module Cwd) tainted, but
that of fastcwd is not? I know, because it is implemented in a
different way, but is there any reason for this from the point of view
of security?
My problem is with File::Find, which used to work beautifully in
tainted mode as long as it still used Cwd::fastcwd. Now (perl
5.00403) that it is implemented with Cwd::cwd, it refuses to run with
an "insecure dependency in chdir". How can I get around this?
cu
Marc Andri
--
selig@zv.fhg.de, mselig@sun1.cip.fak14.uni-muenchen.de
Please cc public responses to email.
------------------------------
Date: 24 Sep 1997 09:18:25 -0700
From: mcravit@best.com (Matthew Cravit)
Subject: Re: undump for Linux
Message-Id: <60begh$jms$1@shell3.ba.best.com>
In article <3428922b.101868608@129.59.1.25>,
Michael Schultheiss <schultmc@vuse.vanderbilt.edu> wrote:
>Does anyone know where I can get an undump binary for Linux? The Perl
>FAQ says undump comes with TeX yet I can't find it anywhere in my TeX
>distribution nor anywhere else. I have found the source code but it
>won't compile correctly so I'm stuck. I'm just trying to compile some
>Perl scripts into binaries
First, you should stop to consider why you want to compile your Perl
scripts into binaries. In general, this does not save you space (the
compiled binary is at least as big as, and generally bigger than, the
Perl binary on your system), and it often does not make your script run
any faster.
However, if you _really_ want to compile a Perl script into a binary,
you probably shouldn't be using undump. Undump was a very non-ideal way
of producing a binary, and generally does not work well on very many
modern UNIX variants. It especially tends not to work well on ELF-based
systems (such as Linux), in my experince.
Far better would be to use Malcolm Beattie's perl compiler stuff, which
is in alpha or beta at the moment. I would suggest reading the following
sections of the Perl FAQ:
(All these URLs are relative to http://www.perl.com/CPAN-local/doc/manual/)
html/pod/perlfaq3/How_can_I_compile_my_Perl_progra.html
html/pod/perlfaq3/How_can_I_hide_the_source_for_my.html
html/pod/perlfaq3/How_can_I_make_my_Perl_program_r.html
Hope this helps.
/MC
--
Matthew Cravit, N9VWG | Experience is what allows you to
E-mail: mcravit@best.com (home) | recognize a mistake the second
mcravit@taos.com (work) | time you make it.
------------------------------
Date: Wed, 24 Sep 1997 15:58:22 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Unlist syntax
Message-Id: <EH0sDB.BwI@world.std.com>
wazza <womlake@zip.com.au> writes:
>I tried out the lines:
>$file = $path."temp.txt";
>unlink $file;
>but nothing seems to be happening. Could someone assist me with the
the syntax is correct. Two hints:
Double check in the debugger that $file has the value you think
it has when you are at the unlink statement. (Does $path have a
trailing directory separator?)
Check the return status of unlink
unlink $file or warn "Oh No! unlink() returned $!\n";
--
Andrew Langmead
------------------------------
Date: Wed, 24 Sep 1997 15:59:28 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Unlist syntax
Message-Id: <EH0sF4.Dyn@world.std.com>
wazza <womlake@zip.com.au> writes:
>I tried out the lines:
>$file = $path."temp.txt";
>unlink $file;
>but nothing seems to be happening. Could someone assist me with the
the syntax is correct. Two hints:
Double check in the debugger that $file has the value you think
it has when you are at the unlink statement. (Does $path have a
trailing directory separator?)
Check the return status of unlink
unlink $file or warn "Oh No! unlink($file) returned $!\n";
--
Andrew Langmead
------------------------------
Date: Wed, 24 Sep 1997 16:28:44 GMT
From: jackson@usenix.org (Jackson Dodd)
Subject: USENIX Conference on Domain-Specific Languages (DSL)
Message-Id: <EH0trw.20n@usenix.org>
Keywords: USENIX, conference, domain-specific languages
Conference on Domain-Specific Languages (DSL 97)
October 15-17, 1997
Santa Barbara, California
Sponsored by USENIX, the Advanced Computing Systems Association
In cooperation with ACM SIGPLAN and SIGSOFT
Software engineers and programmers: Join your peers at DSL 97.
If you work with or are interested in domain-specific languages
and need the latest information, mark your calendar now and plan
to attend this workshop.
USENIX's Conference on Domain-Specific Languages offers the latest
research during two and one-half days of refereed paper presentations,
invited talks by noted experts, Birds-of-a-Feather sessions, and
opportunities to meet your peers and share solutions.
You will learn about the newest research during these refereed
paper sessions:
--Domain-Specific Language Design
--Experience Reports
--Compiler Infrastructure for Domain-Specific Languages
--Logic and Semantics
--Case Studies and Surveys
--Abstract Syntax Trees
--Embedded Languages and Abstract Data Types
=============================================================
FOR DETAILED PROGRAM AND REGISTRATION INFORMATION:
* See the DSL homepage: http://www.usenix.org/events/dsl97/
* Send email to: info@usenix.org. In the body of your message
state "send dsl97 conferences"
* Call the USENIX Conference Office at 714-588-8649
* Send a fax to 714-588-9706
=============================================================
The USENIX Association brings together the community of engineers,
system administrators, scientists, and technicians working on the
cutting edge of computing. Its technical conferences are the essential
meeting grounds for the presentation and discussion of the most
advanced information on new developments in all aspects of advanced
computing systems.
------------------------------
Date: Wed, 24 Sep 1997 10:26:45 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: John Ratzan <ratzan@us.ibm.com>
Subject: Re: UserName Info
Message-Id: <Pine.GSO.3.96.970924102525.6383X-100000@usertest.teleport.com>
On Tue, 23 Sep 1997, John Ratzan wrote:
> I am trying to access $ENV{'REMOTE_USER'}.
>
> I am showing a blank variable.
Then that's what your server is giving you. If you want to get your server
to give you something else, check the docs and FAQs for your server, or
check a newsgroup about servers. They'll be able to give you a better and
more complete answer than we could give you here. Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
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 1072
**************************************