[10264] in Perl-Users-Digest
Perl-Users Digest, Issue: 3857 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 30 11:08:31 1998
Date: Wed, 30 Sep 98 08:00:19 -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, 30 Sep 1998 Volume: 8 Number: 3857
Today's topics:
10 SEP 1998 ==> 1998-09-10 <c-g-magn@dsv.su.se>
Re: 10 SEP 1998 ==> 1998-09-10 <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: an observation on why python will fail (Terry Reedy)
Re: CGI & Zip (Mark-Jason Dominus)
Cperl-mode.el customisation for parentheses (Jari Aalto+mail.perl)
Re: Date <rbowen@rcbowen.com>
Re: Date <barnett@houston.Geco-Prakla.slb.com>
Re: Date <mkahn@vbe.com>
Re: File manipulation <ben@isolve.net>
Re: File manipulation (Mark-Jason Dominus)
help foxz@my-dejanews.com
LDAP FTP authentication <shabicht@teksystems.com>
Re: LDAP FTP authentication <Tony.Curtis+usenet@vcpc.univie.ac.at>
mailing attachments in Perl foxman@affection.com
Re: mailing attachments in Perl <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: mod_perl file closing problem (brian d foy)
Re: Need IP Address Sort Subroutine sjagadish@my-dejanews.com
Re: Need IP Address Sort Subroutine <erhmiru@erh.ericsson.se>
Re: Need IP Address Sort Subroutine (Lack Mr G M)
Re: new term for illogical (brian d foy)
Re: script output to a file <mkahn@vbe.com>
Shared memory, ftok and FreeBSD <massimo.loschi@cineca.it>
Re: SRC: encrypt your Perl scripts! :-) (Greg Bacon)
Re: Substitution-Problem <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: Trouble with ActiveState Perl on WinNT Workstation ztf@my-dejanews.com
Re: What is the maining of "Bare word" <barnett@houston.Geco-Prakla.slb.com>
Re: What is the maining of "Bare word" <mkahn@vbe.com>
Windows NT DNS remote administration with Perl? <rbowen@rcbowen.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 30 Sep 1998 16:00:37 +0200
From: Claes-Goran Magnusson <c-g-magn@dsv.su.se>
Subject: 10 SEP 1998 ==> 1998-09-10
Message-Id: <36123985.41C6@dsv.su.se>
I am trying to convert $rest which consist of a date in the
form DD MMM YYYY (10 SEP 1998). I want to print it as
YYYY-MM-DD (1998-09-10).
I manage to get the year and the day, but the month doesn't
work ...
if ($tag eq 'DATE') {
$rest =~ m/(\d\d\d\d$)/o;
print " $1";
$rest =~ m/[A-Z]{3}/o;
if ($1 eq 'SEP') {
$1=9;
}
etc ...
print "-$1";
$rest =~ m/^(\d\d)/;
print "-$1";
next;
}
Thanks for any help!
TIA!
C-G Magnusson
------------------------------
Date: 30 Sep 1998 16:07:10 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: 10 SEP 1998 ==> 1998-09-10
Message-Id: <834stp4ru9.fsf@vcpc.univie.ac.at>
Re: 10 SEP 1998 ==> 1998-09-10, Claes-Goran
<c-g-magn@dsv.su.se> said:
Claes-Goran> I am trying to convert $rest which consist of a
Claes-Goran> date in the form DD MMM YYYY (10 SEP 1998). I
Claes-Goran> want to print it as YYYY-MM-DD (1998-09-10).
perldoc Date::Manip
perldoc Date::DateCalc
perldoc POSIX (strftime)
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: 29 Sep 1998 06:17:05 GMT
From: tjreedy@udel.edu (Terry Reedy)
Subject: Re: an observation on why python will fail
Message-Id: <6upu11$avg$1@news.udel.edu>
In article
<Pine.SOL.3.95.980928000958.8164M-100000@petra.ee.surrey.ac.uk>,
eep1lw@surrey.ac.uk says...
>
>It always comes down to the most visible leading advocate and exemplar:
>tcl: John Ousterhout
>perl: Larry Wall
>python: George Reese
The obvious parallel to JO and LW is Guido van Rossum. So why the
stupid flamebait? -- or did I just answer my own question?
Terry
------------------------------
Date: 30 Sep 1998 10:35:57 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: CGI & Zip
Message-Id: <6utfkd$k1e$1@monet.op.net>
In article <36122511.4FA8CA04@clear.net.nz>,
j.alpers <j.alpers@clear.net.nz> wrote:
>Hi, I'm trying to write a CGI script in Perl that zips up a bunch of
>files, and have used:
>
>system("zip -0 path/zipfile file1 file2 file3...");
>
>but although the rest of the script functions fine, no zip file is
>created.
It's probably a permission problem; the script runs without permission
to write the output ion the directory you want it to. Or else the
script is executed in the directory that you think it will be, so it
can't find the input files.
------------------------------
Date: 30 Sep 1998 16:26:17 +0300
From: jari.aalto@poboxes.com (Jari Aalto+mail.perl)
Subject: Cperl-mode.el customisation for parentheses
Message-Id: <ptraf3hn346.fsf@olkikukka.i-have-a-misconfigured-system-so-shoot-me>
Hi,
Out Perl style guide contains following paren rules: indent by 4.
How do I configure Cperl-mode to accomodate with this? I'm using 4.6.
Any pointer to documentation that would explain and demonstrate the
the various perl mode variables would be appriciated too.
The defvar docs are not that clear to me.
jari
use vars qw
(
$debug
$verb
$CLEAN,
$INSTALL
$UNINSTALL
$PACKET
$CHECK
$HELP
);
GetOptions
(
"debug" => $debug
, "verbose" => $verb
, "clean" => \$CLEAN
, "install" => \$INSTALL
, "uninstall" => \$UNINSTALL
, "packet" => \$PACKET
, "check" => \$CHECK
, "help" => \$HELP
, "Version" => \$VERSION_OPTION
);
%hash =
(
key => "value"
, anotherKey => "value"
, anotherKey => "value"
, anotherKey => "value"
);
%hash =
(
key =>
[
"one"
, "two"
, "three"
]
, anotherKey =>
[
"one"
, "two"
, "three"
]
);
------------------------------
Date: Wed, 30 Sep 1998 09:20:32 -0400
From: Rich Bowen <rbowen@rcbowen.com>
To: cim@online.ee
Subject: Re: Date
Message-Id: <36123020.1BB7@rcbowen.com>
cim@online.ee wrote:
>
> How can i accurately get tomorrows and day after tomorrows date.
> Simply adding +1 or +2 to todays number will not do.
> The same goes for yesterday. I could define the max number of days for
> each month, but February on some years...!?!?
> Any simple methods?
Add (or subtract) 24*60*60 to the current value of time, then call
localtime to get the day, month, year, etc.
$today = time;
$tomorrow = $today + (24*60*60);
@tomorrows_date = localtime($tomorrow);
Rich
--
perl -e "eval reverse '\'rekcaH lreP rehtonA tsuJ\' tnirp'"
http://www.rcbowen.com/
------------------------------
Date: Wed, 30 Sep 1998 08:02:53 -0500
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
To: cim@online.ee
Subject: Re: Date
Message-Id: <36122BFD.1B413FD0@houston.Geco-Prakla.slb.com>
[courtesy cc to cited author]
cim@online.ee wrote:
>
> How can i accurately get tomorrows and day after tomorrows date.
> Simply adding +1 or +2 to todays number will not do.
> The same goes for yesterday. I could define the max number of days for
> each month, but February on some years...!?!?
> Any simple methods?
>
> cim
Well:
1) use Date::Manip; # I think this is the right module. Check CPAN.
2) perldoc -f Time::Local
3) perldoc -f localtime
4) perldoc -f time
Short example:
#!/usr/local/bin/perl -w
#
$now = time;
$tomorrow = $now + # number of seconds since epoch
( 1 * # 1 day
24 * # 24 hrs/day
60 * # 60 min/hr
60); # 60 sec/min
print "Tomorrow is: $tomorrow seconds since the epoch (1970 on
unix!)\n";
print scalar localtime($tomorrow), "\n";
__END__
The same principal applies for 2 days in the future, 8 days in the past,
etc.
HTH.
Cheers,
Dave
--
Dave Barnett Software Support Engineer (281) 596-1434
"Sometimes you just need the clear epiphany of an a%%-kicking."
- Nathan Regener
------------------------------
Date: Wed, 30 Sep 1998 09:11:37 -0500
From: Mark Kahn <mkahn@vbe.com>
Subject: Re: Date
Message-Id: <36123C19.84DF900F@vbe.com>
cim@online.ee wrote:
>
> How can i accurately get tomorrows and day after tomorrows date.
> Simply adding +1 or +2 to todays number will not do.
> The same goes for yesterday. I could define the max number of days for
> each month, but February on some years...!?!?
> Any simple methods?
>
> cim
Check out the Date::Manip package at:
http://www.perl.com/CPAN-local/CPAN.html
--
Mark Kahn
mkahn@vbe.com
PGP Fingerprint20 = FEF0 1F3F 94C0 EE77 790B 45EA B1C0 262A D7E0 C865
------------------------------
Date: Wed, 30 Sep 1998 11:29:38 +0000
From: Ben Duncan <ben@isolve.net>
Subject: Re: File manipulation
Message-Id: <36121622.8927B35B@isolve.net>
Hi!
> >I'm using a simple formmailer for a web site...
> >This is what each submissions looks like in my mbox:
> >
> >----
> >New submission, posted from Fred (fred@domainname.com)
> >name: Fred
> >subject: your web site
> >comments: great job!
> >---
> >
> >I'm dammed to figure out how to extract the email address! (It's
> >wrapped in ()'s, not seperated by a :)
>
> It sounds to me like the smartest solution would be to change the form
> mailer a little bit to send the informtion in a format that is easier
> to parse. Why don't you try that? Just look in the form mailer
> until you see the line that says `new submission', and then change it
> to have the format you prefer.
I have re-written the formmailer to output to a database, but
I'm still stuck with over 200 submissions in my mbox that are in the
old format.
How can I extract the email address that's within the ()'s?
Thanks!
------------------------------
Date: 30 Sep 1998 10:30:41 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: File manipulation
Message-Id: <6utfah$ju4$1@monet.op.net>
In article <3611E96C.6B0B6D24@isolve.net>, Ben Duncan <ben@isolve.net> wrote:
>I'm using a simple formmailer for a web site...
>This is what each submissions looks like in my mbox:
>
>----
>New submission, posted from Fred (fred@domainname.com)
>name: Fred
>subject: your web site
>comments: great job!
>---
>
>I'm dammed to figure out how to extract the email address! (It's
>wrapped in ()'s, not seperated by a :)
It sounds to me like the smartest solution would be to change the form
mailer a little bit to send the informtion in a format that is easier
to parse. Why don't you try that? Just look in the form mailer
until you see the line that says `new submission', and then change it
to have the format you prefer.
------------------------------
Date: Wed, 30 Sep 1998 13:39:03 GMT
From: foxz@my-dejanews.com
Subject: help
Message-Id: <6utc9n$cc9$1@nnrp1.dejanews.com>
i have plan to make freeweb, anyone can help where i can found cgi scripts
for make account? please help me
regard,
foxz
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 30 Sep 1998 09:41:58 -0400
From: Scott Habicht <shabicht@teksystems.com>
Subject: LDAP FTP authentication
Message-Id: <36123526.D929D049@teksystems.com>
This is a multi-part message in MIME format.
--------------C5B3AFBDAAE4FEEE9807F535
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Does anyone know of a way to authenticate FTP access against an LDAP.
This would be done on an UNIX box running Solaris 3.5.1. Thanks.
Shabby
--------------C5B3AFBDAAE4FEEE9807F535
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Scott Habicht
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Scott Habicht
n: Habicht;Scott
org: <A HREF="http://www.teksystems.com"><IMG BORDER=0 SRC="http://www.vsc.teksystems.com/tekflip.gif"></A>
adr: 7312 Parkway Drive;;;Hanover;MD;21076;USA
email;internet: shabicht@teksystems.com
title: Systems Architect<BR>MCP
tel;work: 410-579-4804
tel;fax: 410-579-4009
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard
--------------C5B3AFBDAAE4FEEE9807F535
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Scott Habicht
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Scott Habicht
n: Habicht;Scott
org: <A HREF="http://www.teksystems.com"><IMG BORDER=0 SRC="http://www.vsc.teksystems.com/tekflip.gif"></A>
adr: 7312 Parkway Drive;;;Hanover;MD;21076;USA
email;internet: shabicht@teksystems.com
title: Systems Architect<BR>MCP
tel;work: 410-579-4804
tel;fax: 410-579-4009
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard
--------------C5B3AFBDAAE4FEEE9807F535--
------------------------------
Date: 30 Sep 1998 15:55:34 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: LDAP FTP authentication
Message-Id: <837lyl4sdl.fsf@vcpc.univie.ac.at>
Re: LDAP FTP authentication, Scott <shabicht@teksystems.com>
said:
Scott> Does anyone know of a way to authenticate FTP access
Scott> against an LDAP. This would be done on an UNIX box
Scott> running Solaris 3.5.1.
^^^^^^ really?
I think you win today's "completely off-topic and unrelated
to perl" award. Congrats!
Scott> Content-Disposition: attachment; filename="vcard.vcf"
Please don't post all this, it just eats up space.
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Wed, 30 Sep 1998 13:42:26 GMT
From: foxman@affection.com
Subject: mailing attachments in Perl
Message-Id: <6utcg2$cg7$1@nnrp1.dejanews.com>
okay, so we can use simple commands like "sendmail" or "mail" to send messages
to an email.
but how can we send attachments also?
say i wanted to send a document or an image, how would i specify this format?
TIA
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 30 Sep 1998 15:59:14 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: mailing attachments in Perl
Message-Id: <8367e54s7h.fsf@vcpc.univie.ac.at>
Re: mailing attachments in Perl, foxman
<foxman@affection.com> said:
foxman> okay, so we can use simple commands like "sendmail"
foxman> or "mail" to send messages to an email. but how can
foxman> we send attachments also? say i wanted to send a
foxman> document or an image, how would i specify this
foxman> format?
as a start:
perldoc MIME::Base64
perldoc MIME::Tools
perldoc Mail::Send
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Wed, 30 Sep 1998 10:43:19 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: mod_perl file closing problem
Message-Id: <comdog-ya02408000R3009981043190001@news.panix.com>
Keywords: from just another new york perl hacker
In article <6urq8g$heo$1@godzilla.zeta.org.au>, dformosa@zeta.org.au (David Formosa) posted:
>In <m3af3joy6u.fsf@joshua.panix.com> Jonathan Feinberg <jdf@pobox.com> writes:
>
>>ryan@mail.ramresearch.com (Ryan McGuigan) writes:
>
>>> How can I close all open files that are still open, if I don't know
>>> what files are open?
>
>>You can't[*]. Therefore you must *know what files are open*.
>
> exit;
>
>Would solve this problem,
but that also kills the httpd child process which means you might
as well use CGI. not sure what Apache::exit() will do with close
though.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>
------------------------------
Date: Wed, 30 Sep 1998 12:50:28 GMT
From: sjagadish@my-dejanews.com
Subject: Re: Need IP Address Sort Subroutine
Message-Id: <6ut9ek$92d$1@nnrp1.dejanews.com>
> Why? IP address is a string of four characters. It is better to
> sort them as strings.
Wont work. If u sorted addreses as strings, u'd have 130.4.aaa.bbb listed
AFTER 130.111.xxx.yyy while arranging in ascending order because 1 comes
before 4
one method wud be to do a numerical comparison on each element of the ip addr,
ie each block.
jagadish
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 30 Sep 1998 16:49:59 +0200
From: Michal Rutka <erhmiru@erh.ericsson.se>
To: sjagadish@my-dejanews.com
Subject: Re: Need IP Address Sort Subroutine
Message-Id: <laww6ly7s8.fsf@erh.ericsson.se>
sjagadish@my-dejanews.com writes:
> > Why? IP address is a string of four characters. It is better to
> > sort them as strings.
>
> Wont work.
Are you sure what are you talking about?
> If u sorted addreses as strings, u'd have 130.4.aaa.bbb listed
> AFTER 130.111.xxx.yyy while arranging in ascending order because 1 comes
> before 4
OK. I've run the following script (the sort routine to compare strings
is from my previous post):
@ips = ('130.111.0.0','130.4.0.0');
@ips_sorted = sort {pack("C4",split(/\./,$a)) cmp pack("C4",split(/\./,$b))}
@ips;
foreach(@ips_sorted){
print "$_\n";
}
And guss which result I'vr got? Here it is:
130.4.0.0
130.111.0.0
Again, IP address is a string of four 8 bit characters!
> one method wud be to do a numerical comparison on each element of the ip addr,
> ie each block.
Not true. I can compare a complete adress like in my code. Don't need to
do four comparision.
>
> jagadish
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 30 Sep 1998 15:24:27 BST
From: gml4410@ggr.co.uk (Lack Mr G M)
Subject: Re: Need IP Address Sort Subroutine
Message-Id: <1998Sep30.152427@ukwit01>
In article <6urq6t$pe2$1@callisto.clark.net>, "Joe Williams" <willliams@clark.net> writes:
|>
|> Does anyone have, or can anyone me toward a routine that will sort IP
|> addresses? Many thanks.
No, but this simpel script should give you an idea.
Basically, you use inet_aton to convert it to a 4-char item (so it
can sort out that 10.12 is really 10.0.0.12 and hence get it between
10.0.0.1 and 10.0.1.1 in the example) then sort that (*as a character
string*).
The sort uses the Orcish Maneuver (see Effective Perl at
http://www.effectiveperl.com/) so you only call inet_aton once
per-address, in case you have a lot of them...
==================================================================
use Socket;
@addr = ( '100.1.2.3',
'10.12',
'10.0.0.1',
'10.0.1.1',
'200.1.2.3',
'100.2.3.4',
'100.11.12.13',
'100.19.18.17');
{my %hc; # Localize cache hash
@sorted = sort {
($hc{$a} ||= inet_aton($a)) cmp ($hc{$b} ||= inet_aton($b))
} @addr;
}
{local $"=', ';
print "Original: @addr\n";
print "Sorts to: @sorted\n";
}
==================================================================
--
----------- Gordon Lack ----------------- gml4410@ggr.co.uk ------------
The contents of this message *may* reflect my personal opinion. They are
*not* intended to reflect those of my employer, or anyone else.
------------------------------
Date: Wed, 30 Sep 1998 10:40:07 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: new term for illogical
Message-Id: <comdog-ya02408000R3009981040070001@news.panix.com>
Keywords: from just another new york perl hacker
In article <36115CDB.15E38D59@bbnplanet.com>, Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> posted:
>Uri Guttman wrote:
>
>HappyFunBall! not girl. grrrr. Do not taunt.
yeah! he really reesed that one. ;)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>
------------------------------
Date: Wed, 30 Sep 1998 09:19:58 -0500
From: Mark Kahn <mkahn@vbe.com>
Subject: Re: script output to a file
Message-Id: <36123E0E.121957C3@vbe.com>
_cim_ wrote:
>
> How do i make a script write its output to a specific location in a
> file, so that the area is separated by html comments and only the area
> between the comments gets overwritten.
> Is it difficult to do?
Look in perlfaq5 under "How do I change one line in a file/delete a line
in a file/insert a line in the middle of a file/append to the
beginning of a file?". You do have documentation, don't you?
HTH
--
Mark Kahn
mkahn@vbe.com
PGP Fingerprint20 = FEF0 1F3F 94C0 EE77 790B 45EA B1C0 262A D7E0 C865
------------------------------
Date: Wed, 30 Sep 1998 15:17:50 +0200
From: Massimo Loschi <massimo.loschi@cineca.it>
Subject: Shared memory, ftok and FreeBSD
Message-Id: <36122F7E.B353067@cineca.it>
Hi,
I'm trying to call the ftok(3) from perl to use a shared memory segment
from
two processes.
The first process attempts to create the key suitable for use with
shmwrite:
______________________________
#!/usr/local/bin/perl5.00502
use IPC::SysV qw(ftok);
$SHM_ID = 1;
$KEY_PATH = 'keyid';
$key = ftok($KEY_PATH,$SHM_ID);
_______________________________
Executing this simple perl script, I obtain:
/usr/libexec/ld.so: Undefined symbol "_ftok" called from
perl5.00502:/usr/local/lib/perl5/5.00502/i386-freebsd/auto/IPC/SysV/SysV.so
at 0x201380ec
I'm using:
- FreeBSD 2.2.6-RELEASE
- in /usr/lib there is not libcompat.so, but only the static version of
the library (libcompat.a). libcompat.so is not also in compat1x,
compat20 and
compat21 distributions, and recompiling the slib distribution, it make
only
libcompat.a and the profiled version of this library.
- nm(1) reports that exists _ftok() in /usr/lib/libcompat.a
- perl 5.005_02 (from FreeBSD ports collection)
- my kernel is compiled with all (I think) System V options:
options SYSVSHM
options SYSVSEM
options SYSVMSG
Where I can find the dynamic version of libcompat?!?!?
Can someone help me?!?!
Thanks in advance for your prompt help and reply!
Massimo
---------------------------------------------------------------------------
Massimo Loschi
CINECA - Interuniversity Computing Centre E-mail:
m.loschi@cineca.it
Networks and Distributed Systems group
Via Magnanelli 6/3 Tel: +39 51 6171411
40033 Casalecchio di Reno - BOLOGNA Fax: +39 51 6132198
ITALY
---------------------------------------------------------------------------
------------------------------
Date: 30 Sep 1998 14:28:21 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: SRC: encrypt your Perl scripts! :-)
Message-Id: <6utf65$nrq$1@info.uah.edu>
In article <6urf5b$10p$1@nnrp1.dejanews.com>,
jesten@wdynamic.com writes:
: ....note that the encryption fails on here documents...
:
: print <<EOF;
:
: becomes...
:
: print <<E
I couldn't reproduce this. Could your editor be munging things?
Greg
--
The O-O languages give you more of course - prettier syntax, derived types and
so on - but conceptually they provide little extra.
-- Rob Pike
------------------------------
Date: 30 Sep 1998 16:51:12 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
To: guelkev@de.polygram.com
Subject: Re: Substitution-Problem
Message-Id: <833e994psv.fsf@vcpc.univie.ac.at>
Re: Substitution-Problem, guelkev <guelkev@de.polygram.com>
said:
guelkev> Hello everybody, I have a problem with substitution
guelkev> in perl. I want to cut the "http://serveradress"
guelkev> Part from an URL to become a local URL.
guelkev> I tried the following statement: $url =~
guelkev> s@http://*/@/@; which should replace the
guelkev> http://..../ with a single /.
A different approach is not to use regexps but to use
something that really understands the syntax of a URL:
use URI::URL;
my $u = new URI::URL 'http://host/path/to/whatever';
print $u->path, "\n";
=> /path/to/whatever
guelkev> The result is, that it replace the part of the
guelkev> string I wrote directly but not that part which is
guelkev> included in the "*".
You want ".*" as a closure -- otherwise you mean "0 or more /".
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Wed, 30 Sep 1998 13:38:44 GMT
From: ztf@my-dejanews.com
Subject: Re: Trouble with ActiveState Perl on WinNT Workstation 4.0SP3
Message-Id: <6utc94$cc5$1@nnrp1.dejanews.com>
In article <360b8892.78381226@news.ml.com>,
steven_elias@ml.com (Stephen Elias) wrote:
> Works great on my machine.
>
> Check your system variable PATH and rearrange it to put
> C:\WINNT\SYSTEM32 in front.
>
> Perhaps outlook is looking for dll's and it's taking longer to search
> the PATH ???
>
> Just a guess however
Thanks. I installed ActivePerl again, in order to try out your
suggestion, and I didn't see the problem again.
Zach
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 30 Sep 1998 07:43:31 -0500
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
To: Wong Kin Sang <wongksp@netvigator.com>
Subject: Re: What is the maining of "Bare word"
Message-Id: <36122773.2BED2DB7@houston.Geco-Prakla.slb.com>
[courtesy cc to cited author]
Wong Kin Sang wrote:
>
> Hi all of you,
>
> Recently I've got a question about wirting perl script. When I try to
> run a perl script, an error " Bare word found where operatior
> expected" has appear. What should I do/check for this ? (I've check
> that I haven't miss { ; " or wrong spelling.
Those are the things to look for.
Perl is telling you that it is having trouble parsing what you're
feeding in. Usually because of missing ;, ', or " characters.
Perhaps a code snippet (the line that fails +- 10 lines) would allow
someone here to help you.
>
> Thanks.
>
> Patrick
Cheers,
Dave
--
Dave Barnett Software Support Engineer (281) 596-1434
Do infants enjoy infancy as much as adults enjoy adultery?
------------------------------
Date: Wed, 30 Sep 1998 08:03:36 -0500
From: Mark Kahn <mkahn@vbe.com>
Subject: Re: What is the maining of "Bare word"
Message-Id: <36122C28.B3553CD3@vbe.com>
Wong Kin Sang wrote:
>
> Hi all of you,
>
> Recently I've got a question about wirting perl script. When I try to
> run a perl script, an error " Bare word found where operatior
> expected" has appear. What should I do/check for this ? (I've check
> that I haven't miss { ; " or wrong spelling.
>
> Thanks.
>
> Patrick
Do you not have Perl documentation?
>From perldata doc:
A word that has no other interpretation in the grammar
will be treated as if it were a quoted string. These are
known as "barewords". As with filehandles and labels, a
bareword that consists entirely of lowercase letters risks
conflict with future reserved words, and if you use the -w
switch, Perl will warn you about any such words. Some
people may wish to outlaw barewords entirely. If you say
use strict 'subs';
then any bareword that would NOT be interpreted as a
subroutine call produces a compile-time error instead.
HTH,
Mark
------------------------------
Date: Wed, 30 Sep 1998 09:41:00 -0400
From: Rich Bowen <rbowen@rcbowen.com>
Subject: Windows NT DNS remote administration with Perl?
Message-Id: <361234EC.4907@rcbowen.com>
It turns out that the remote administration tools that come with NT
Workstation allow you to manage all sorts of services on remote machines
- DHCP, Event Logs, Services - but not DNS. So, since DNS is the thing
that we most need to adminster at the moment, it means getting up and
walking into the NOC every time something needs to get changes.
So, naturally, I wondered if there was anyone that had any experience
with remotely administering NT DNS with Perl. It was not clear to me
from the libwin docs if that is contained in there, mostly because I am
not sure what I am looking for. It is equally not clear to me why we are
not doing DNS on Unix machines, but that's an entirely different story,
isn't it?
Any assistance in this matter would be greatly appreciated, in the
spirit of Laziness, so that I don't have to make that long trek to the
NOC.
Rich
--
perl -e "eval reverse '\'rekcaH lreP rehtonA tsuJ\' tnirp'"
http://www.rcbowen.com/
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3857
**************************************