[8497] in Perl-Users-Digest
Perl-Users Digest, Issue: 2114 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 17 03:07:26 1998
Date: Tue, 17 Mar 98 00:00:55 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 17 Mar 1998 Volume: 8 Number: 2114
Today's topics:
Re: A matter of timing <aet@aryth.webplanets.com>
Re: adding time? <uri@sysarch.com>
Re: adding time? (Abigail)
Re: adding time? (Martin Vorlaender)
Re: contexts: is there such a thing as array? <aet@aryth.webplanets.com>
Re: globbing vs. opendir / readdir <snailgem@aol.com>
Help on NT logout script in Perl <mike@lab.usyd.edu.au>
Re: how to assign unix command options in perl (Martin Vorlaender)
Re: How to use CPAN modules/no permission to install <sbekman@iil.intel.com>
Re: HTTP_USER_AGENT - any others? <tonylabb@infonline.net>
Re: Input <kmiles@erols.com>
Re: Is there a "Newsgroup" for Newbies to Perl? (Tye McQueen)
Re: LDAP interface <ausjohnston@worldnet.att.net>
Re: Need help with PERL programming (Jon Bell)
Re: Need help with PERL programming (Mike King)
Re: Need help with PERL programming parkesb@yahoo.com
need perl script to read utmp files <maxin@iscs.nus.edu.sg>
Re: opendir and UNC's in NT <metcher@spider.herston.uq.edu.au>
Re: opendir and UNC's in NT <dsb@bit.bucket.org>
Re: perl library <kmiles@erols.com>
Re: Reference to a part of a hash? <scribble@pobox.com>
Telnet control codes, stumped! <aet@aryth.webplanets.com>
Re: The -w switch (was Re: better way to do this?) (Peter Samuelson)
Re: Tied and blessed? <bholzman@mail.earthlink.net>
Re: Why this one doesn't work ? (Peter Samuelson)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 16 Mar 1998 14:06:16 GMT
From: Andy Tompkins <aet@aryth.webplanets.com>
Subject: Re: A matter of timing
Message-Id: <6ejbko$97l$2@aginor.webplanets.com>
Daniel <rkdious@ix.netcom.com> wrote:
> Hello
> I'm trying to find a way to delay my program for less than a second. The
> sleep() routine will only sleep for whole seconds. The select() routine
> doesn't seem to function under either WinNT or (don't laugh) Win95.
> Has anyone else had the same problem with delays?
> -Daniel
>From Camel:
sleep EXPR
sleep
This function causes the script to sleep for EXPR seconds, or forever if
no EXPR. It may be interrupted by sending the process a SIGALRM. The
function returns the number of seconds actually slept. On some systems,
the function sleeps till the "top of the second," so, for instance, a
sleep 1 may sleep anywhere from 0 to 1 second, ...<SNIP>
may also be able to use syscall to call the getitimer(2) and setitimer(2)
routines
I was only quoting that to point out that your sleep 1 might in fact BE
sleeping for less than a sec. I know thats probably useless, so I also
included the setitimer/getitimer stuff...
maybe you could try and calculate how long some instruction takes?
like if $c++ takes on average 15 ms, then u can just stick it in a loop
and have fairly good resolution (nearest 15 ms?)
of course its possible that a reasonable average is only obtained after an
insufficiently large number of loops..due to external factors, system
load, memory usage, etc.
Check CPAN, perhaps someone has implemented a higher res timer.
--- andy
------------------------------
Date: 16 Mar 1998 23:40:39 -0500
From: Uri Guttman <uri@sysarch.com>
To: mocat@spamtrap.best.com (jay)
Subject: Re: adding time?
Message-Id: <x790qaj5fc.fsf@sysarch.com>
jay,
how could you not know this one? it has been covered in past threads too
and did you search dejanews? i wouldn't even be surprised if it an faq.
you convert the time stamp to seconds, add the delta in seconds and
convert back to a time stamp. i leave how to do the conversions as an
exercise which i know you can solve.
uri
--
Uri Guttman SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---- 8 years of Perl experience, Available Immediately
uri@sysarch.com Resume and Sample code at http://www.sysarch.com
Try the Best Search Engine on the Net --------> http://www.northernlight.com
------------------------------
Date: 17 Mar 1998 05:03:35 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: adding time?
Message-Id: <6el077$rgp$3@client2.news.psi.net>
jay (mocat@spamtrap.best.com) wrote on MDCLIX September MCMCLIII in
<URL: news:350dee8b.352321287@nntp.best.com>:
++ What is the best way to add hours, minutes, or seconds to the time?
++ I've read the manpages for localtime, Time::localtime, and
++ Time::Local, and have come up with nothing.
++
++ 19:43:33 + 30 minutes is 19:73:33... ;)
++ not exactly what i want...
++ 20:13:33 sounds more like it.. but I cant get perl to do this for
++ me...
$ perl -wle 'print scalar localtime, "\n", scalar localtime time + 30 * 60'
Tue Mar 17 00:02:31 1998
Tue Mar 17 00:32:31 1998
$
Abigail
--
perl -wle 'print "Prime" if (0 x shift) !~ m 0^\0?$|^(\0\0+?)\1+$0'
------------------------------
Date: Tue, 17 Mar 1998 06:11:03 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: adding time?
Message-Id: <350e05e7.524144494f47414741@radiogaga.harz.de>
jay (mocat@spamtrap.best.com) wrote:
: What is the best way to add hours, minutes, or seconds to the time?
: I've read the manpages for localtime, Time::localtime, and
: Time::Local, and have come up with nothing.
: 19:43:33 + 30 minutes is 19:73:33... ;)
: not exactly what i want...
: 20:13:33 sounds more like it.. but I cant get perl to do this for me...
Have a look at the Date::Manip module, available at a CPAN mirror near you
at http://www.perl.com/CPAN/
cu,
Martin
--
| Martin Vorlaender | VMS & WNT programmer
Ceterum censeo | work: mv@pdv-systeme.de
Redmondem delendam esse. | http://www.pdv-systeme.de/users/martinv/
| home: martin@radiogaga.harz.de
------------------------------
Date: 16 Mar 1998 13:51:23 GMT
From: Andy Tompkins <aet@aryth.webplanets.com>
Subject: Re: contexts: is there such a thing as array?
Message-Id: <6ejaor$97l$1@aginor.webplanets.com>
M.J.T. Guy <mjtg@cus.cam.ac.uk> wrote:
> In article <x71zwjyyjc.fsf@sysarch.com>, Uri Guttman <uri@sysarch.com> wrote:
> >kcohen@julius.ling.ohio-state.edu (Kevin B Cohen) writes:
> >> different behavior with the array @stuff versus with the list ("one",
> >> "two", "three"), so let's call bread bread and wine wine and conclude
> >> that these are different contexts.
> >
> >wrong. an array variable evaluated in a scalar context gives the number
> >of elements in an array. a list evaluated in an scalar context give the
> >last element of the list.
> Sorry, but wrong again. You can never have "a list evaluated in an
> scalar context". The ONLY way you can get a list in Perl is by
> evaluating some expression in list context. So the well known line
> in the Camel and in perlfunc
> THERE IS NO GENERAL RULE FOR CONVERTING A LIST INTO A SCALAR!
> is actually rather misleading. This situation can NEVER OCCUR, so
> there is no question of a rule, general or particular.
> Mike Guy
Of course, this all hinges on the context of 'context'.
To me
$next_index = @array + 1;
uses a list in a scalar context.
It is explicit in the 'context' that i WANT a scalar value, NOT the list.
I guess it's silly to argue semantics though.
Since @array and $array ARE different, you're right, you CANNOT convert a
list into a scalar, but in the context that phrase was used, it was merely
trying to imply that one shouldnt depend on lists evaluated in a scalar
context returning length values.
$bucket_usage = %hash; <- somwhere around page 50 in the camel
--- andy
------------------------------
Date: Mon, 16 Mar 1998 23:27:40 -0500
From: Will Snailgem <snailgem@aol.com>
Subject: Re: globbing vs. opendir / readdir
Message-Id: <350DFBBB.8E08CD9C@aol.com>
Yes it seems that Perl treats that C shell forked by file globs as fatally
insecure, which means that you're out of luck if you try to use them in a
suid script.
Sneex wrote:
> Also I believe that once the 'shell' is invoked this way, taint checking
> fails?
>
> /^Pretty sure$/;
> Sneex :)
>
> Jeff Yoak wrote:
>
> > When should one use globbing as against readdir and vice versa? For
> > applications I can think of, it seems trivial to emulate the behavior
> > of one with the other, perhaps with a little outside help.
> >
> > E.g.
> >
> > @contents = </some/dir/*>;
> >
> > opendir(DIR,'/some/dir') || die "Can't open directory $!";
> > @contents = readdir(DIR);
> > closedir(DIR);
> >
> > Cheers,
> > Jeff
> >
> > -------------------------------
> > Jeff Yoak jeff@yoak.com
------------------------------
Date: Tue, 17 Mar 1998 15:26:24 +1000
From: "Fisher Lab" <mike@lab.usyd.edu.au>
Subject: Help on NT logout script in Perl
Message-Id: <6ektvo$kj6@metro.usyd.edu.au>
This is a multi-part message in MIME format.
------=_NextPart_000_002F_01BD51B9.0BD2B5C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I'm trying to write a script that resets NT back to the login screen =
(Press Ctrl-Alt-Del to login) when it loses the connection to a Netware =
server. Are there any perl functions or internal NT commands that can =
either reset to the login screen or detect the presence of a Netware =
server?
Please reply direct to mike@lab.usyd.edu.au .
------=_NextPart_000_002F_01BD51B9.0BD2B5C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY>
<DIV>I'm trying to write a script that resets NT back to the login =
screen (Press=20
Ctrl-Alt-Del to login) when it loses the connection to a Netware server. =
Are=20
there any perl functions or internal NT commands that can either reset =
to the=20
login screen or detect the presence of a Netware server?</DIV>
<DIV>Please reply direct to <A=20
href=3D"mailto:mike@lab.usyd.edu.au">mike@lab.usyd.edu.au</A>=20
.</DIV></BODY></HTML>
------=_NextPart_000_002F_01BD51B9.0BD2B5C0--
------------------------------
Date: Tue, 17 Mar 1998 06:28:03 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: how to assign unix command options in perl
Message-Id: <350e09e3.524144494f47414741@radiogaga.harz.de>
Lalit Jairath (ljairath@wright.aps.uoguelph.ca) wrote:
: Hi all,
: how can i assign unix command options in perl?
: i do the following:
: $_ = `date -u +%B`;
: print;
: it does not work. it just prints B.
Backticks interpolate, so in the above command, %B gets interpreted as "the
hash named B". You need to escape the '%' by prefixing it with a '\'.
Or replace the backticks by qx{} .
See perldoc perlop, "Quote and Quote-like Operators".
cu,
Martin
--
| Martin Vorlaender | VMS & WNT programmer
Ceterum censeo | work: mv@pdv-systeme.de
Redmondem delendam esse. | http://www.pdv-systeme.de/users/martinv/
| home: martin@radiogaga.harz.de
------------------------------
Date: Tue, 17 Mar 1998 09:07:43 +0200
From: Bekman Stanislav <sbekman@iil.intel.com>
To: s11976@net1.hkbu.edu.hk
Subject: Re: How to use CPAN modules/no permission to install
Message-Id: <350E213F.1CFB@iil.intel.com>
Andreas Laufer wrote:
>
> Jan Krynicky schrieb:
> >
> > P.M.Wong wrote:
> > >
> > > Sorry for asking such trivial question but i just can't find
> > > any doc telling me what to do once i downloaded those CPAN modules
> > > For example, i just downloaded the CGI_Lite and after extracting the
> > > tar file, i found files like CGI_Lite.pm and Makefile.PL there.
> > > Do i have to make it (that's using Makefile.PL) before i can use
> > > it
> > > OR simply copy the CGI_Lite.pm to the appropriate directory
> > > (in my case it is /usr/local/lib/perl5/aix/5.00401 )
> >
> > Some modules do not need any installing so you may just copy the .pm
> > files to correct directory. I don't know if CGI_Lite.pm is this case.
> >
> > You should at least try to make it. The most common process is :
> >
> > perl Makefile.PL
> > make
> > make test
> > make install
> >
> > That is put the files into some directory. Run perl with the Makefile.pl
> > as the first parameter. This will create a file named makefile.
> > You will then call "make" (without parameters), then "make test"
> > to check everything is OK and at last "make install".
> >
> > >
> > > If i need to make it, how do i go about doing it
> > > (I don't see any !#/usr/local/bin/perl line in the file Makefile.PL)
> >
> > It can't, the author cannot know where did you put perl.
> > I have seen it in /usr/bin/perl, /big/bin/perl, ...
> > your is /usr/local/bin/perl.
> >
> > You just have to call perl explicitly from the command line.
> > (Unless of course working with Windoze. It does not use #!)
>
> How can I install and use perl modules which have in the readme the
> lines
> perl Makefile.PL
> make
> make test
> make install
> when I have only a cgi-bin on a machine with perl5 but neither root
> access nor a telnet access, only ftp ?
See my faq about this at:
http://www.eprotect.com/stas/TULARC/webmaster/myfaq.html
It explains exactly how to do that!
______________________________________________________________________
Stas Bekman mailto:sbekman@iil.intel.com [just another webmaster]
Home Page: http://www.eprotect.com/stas
A must visit: http://www.eprotect.com/stas/TULARC (Java,CGI,PC,Linux)
Linux-il Home: http://www.linux.org.il/
Linux receives a 'Product of the Year Award' for Best Technical Support
http://www.infoworld.com/cgi-bin/displayTC.pl?97poy.supp.htm
------------------------------
Date: Mon, 16 Mar 1998 23:52:19 -0500
From: Tony Labbiento <tonylabb@infonline.net>
Subject: Re: HTTP_USER_AGENT - any others?
Message-Id: <350E0183.8ADC7FA3@infonline.net>
Try adding these lines to your CGI:
foreach (keys %ENV) {
print "$_ = $ENV{$_}\n";
}
This should print out all of your servers environment variables.
Ben wrote:
> Hiya!
>
> I wonder if any1 know whereabout you can find ... For ALL ones you can have
> ....
>
> Some of them are ....
>
> HTTP referer - $ENV{'HTTP_REFERER'}
> Remote addr - $ENV{'REMOTE_ADDR'}
> Remote host - $ENV{'REMOTE_HOST'}
> Remote ident - $ENV{'REMOTE_IDENT'}
>
> I wonder if any1 know the one for ... HTTP_REFERER or something? When I run
> the program, it didn't show where I came from .... And, what about the one
> "TZ" or something? But, can any1 show me where to find, for ALL of them?
> A-Z!
>
> Thanks in advance :)
>
> Regards
>
> Ben :)
--
****************************************
* Tony Labbiento *
* Infinity Online, Inc. *
* Programmer/Network Administrator *
****************************************
------------------------------
Date: Mon, 16 Mar 1998 23:39:00 -0500
From: kmiles <kmiles@erols.com>
Subject: Re: Input
Message-Id: <350DFE64.2E56@erols.com>
chomp($var = <STDIN>); # chomp assuming you don't want the newline
James R. Edgar wrote:
>
> I need to know how to be able to call input from a shell prompt instead
> of a form
>
> Any help would be appreciated.
>
> James R. Edgar
------------------------------
Date: 16 Mar 1998 14:07:05 -0600
From: tyde@medtrodnet.cdom (Tye McQueen)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <6ek0p9$p1d@fohnix.metronet.com>
Mark Stackhouse <stackhou@execpc.com> writes:
) <HTML>
No, this is Usenet, not a Web page. Your newsreader may
like this kind of stuff but you're limited your audience
until you do some research and figure out how to turn that
"feature" off.
) Because maybe the Cookbook will actually provide links to what one is looking
) for! Today I needed a reference to a rounding function. OK...
) go to the FAQ! Right?
)
) <P>FAQ has a question - Does Perl have a round function? All right...
) here we go. Click on the hypertext.
)
) <P>Now I'm in Perl Docs...
What copy of the FAQ were you looking at? When I click on
the hypertext link I get (from
http://www.perl.com/CPAN/doc/FAQs/FAQ/PerlFAQ.html which I
found starting at http://www.perl.com => click on "FAQs" =>
click on "html format"):
Does perl have a round function? What about ceil() and
floor()? Trig functions?
For rounding to a certain number of digits, sprintf or printf
is usually the easiest route.
[...]
Is this a troll? If you can't use the FAQ, what makes you think
you'd be able to use the cookbook? Didn't you think something
might be wrong when you clicked on a specific question and ended
up at the very root of the Perl documentation which has almost
nothing directly to do with that question?
Post in more detail how to reproduce what you did so we can fix
it.
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
Remove d's from address to reply (sorry for the inconvenience).
------------------------------
Date: 17 Mar 1998 07:20:51 GMT
From: "Austin Johnston" <ausjohnston@worldnet.att.net>
Subject: Re: LDAP interface
Message-Id: <6el88j$2cn@bgtnsc02.worldnet.att.net>
I was doing some very rudimentary things with perl to perform updates on
LDAP databases. The Netscape server comes with an "ldapmodify" command that
you issue from your script. There seems to be a package that cans some of
it.
You might want to look at the LDAPP package found at:
http://help.netscape.com/kb/server/970205-21.html
.
Norman Bunn <norman.bunn@mci.com> wrote in article
<nVeP.3$%%2.8367@news.internetMCI.com>...
> Has anyone used LDAP with PERL? If so, how?
>
> Norman
>
>
>
------------------------------
Date: Tue, 17 Mar 1998 04:56:34 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: Need help with PERL programming
Message-Id: <Epy5qA.8KH@presby.edu>
masroor <masroor@bga.com> wrote:
>
>3) I do the following to redirect the output of the ping to my perl
>script.
>
> % ping 10.10.10.10 | myprog.pl
>
>4) The contents of myprog.pl is below.
>
> #!/bin/perl
> print "$ARGV[0]\n" ;
That's all?
When you pipe the output from one program into a second program, the
second program receives the data on standard input. So, the second
program should read from standard input and process the data accordingly.
For example,
#!/bin/perl
while ($Line = <STDIN>) {
print $Line;
}
--
Jon Bell <jtbell@presby.edu>
------------------------------
Date: Tue, 17 Mar 1998 05:04:48 GMT
From: m.king.garbage@praxa.garbage.com.au (Mike King)
Subject: Re: Need help with PERL programming
Message-Id: <350e03b7.1037932097@news.ozemail.com.au>
Turn the thing around:
You can do this in one of two ways :-
1) From within your perl program, shell out a command, something like
this :-
system( "ping 10.10.10.10 >/tmp/pingfile")
Then open the file and process the contents
or 2) Use the perl module, I think it's called NET, which has
programmatic access to functions such as ping. Have a look at the perl
documentation to work out exactly how. This is a much better method.
Cheers
Mike
On 17 Mar 98 03:27:39 GMT, masroor <masroor@bga.com> wrote:
>
>I am trying to program the following, but having problems to capture a
>specific data. Any help would be appreciated.
>The following is the description.
>
>1)Say when you ping a machine from the command line in UNIX you get the
> following.
>The command I am using to ping is "ping 10.10.10.10".
>
>OUTPUT below
>========================================================
>64 bytes from 10.10.10.10: icmp_seq=0 ttl=255 time=0 ms
>64 bytes from 10.10.10.10: icmp_seq=1 ttl=255 time=0 ms
>
>2) I would feed the above ping response back to my perl program, and in my
> perl program I need to capture the "icmp_seq=0" information. But I am
> unable to do so.
>
>3) I do the following to redirect the output of the ping to my perl
>script.
>
> % ping 10.10.10.10 | myprog.pl
>
>4) The contents of myprog.pl is below.
>
> #!/bin/perl
> print "$ARGV[0]\n" ;
>
>5) The command "ping 10.10.10.10" is a continous command, it should never
> stop. But when I do step #3 , the ping stops and I get no output.
>
>6) Basically my goal is to redirect of the ping output to myprog and
> process the icmp_seq value, how can I capture the "icmp_seq" value ?
>
>Thanks
>Masroor
>email masroor@bga.com
>
------------------------------
Date: Tue, 17 Mar 1998 01:38:50 -0600
From: parkesb@yahoo.com
Subject: Re: Need help with PERL programming
Message-Id: <6el96n$c2s$1@nnrp1.dejanews.com>
Since many people have been saying that non-"perl experts" aren't having
a go at answering the problems here is an attempt. I think that this
should do it:
while (<STDIN>)
{
s/.*(icmp_seq=[0-9]*).*/$1/ ;
print if /icmp_seq=[0-9]*/;
}
Brian
email: parkesb@yahoo.com
In article <350dedab.0@feed1.realtime.net>,
masroor <masroor@bga.com> wrote:
>
>
> I am trying to program the following, but having problems to capture a
> specific data. Any help would be appreciated.
[snip]
> 4) The contents of myprog.pl is below.
>
> #!/bin/perl
> print "$ARGV[0]\n" ;
>
> 5) The command "ping 10.10.10.10" is a continous command, it should never
> stop. But when I do step #3 , the ping stops and I get no output.
>
> 6) Basically my goal is to redirect of the ping output to myprog and
> process the icmp_seq value, how can I capture the "icmp_seq" value ?
>
> Thanks
> Masroor
> email masroor@bga.com
>
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: 17 Mar 1998 06:37:54 GMT
From: Ma Xin <maxin@iscs.nus.edu.sg>
Subject: need perl script to read utmp files
Message-Id: <6el5o2$7425@id4.nus.edu.sg>
I'm looking for a perl script to read the utmp files(including /etc/utmp, /etc/wtmp, etc) in unix. I think it can be read using pack, unpack function in perl but I'm not sure what format the utmp files use. anyone?
TIA.
_____
Best Regards,
Ma Xin
------------------------------
Date: Tue, 17 Mar 1998 14:30:44 +1000
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: opendir and UNC's in NT
Message-Id: <350DFC73.63A90D52@spider.herston.uq.edu.au>
Yes:
opendir DH, "//server/share" || die "$!";
gives "Permission denied" on NT 4.0, even for shares with "Full control"
permissions in both the share and the NTFS.
The funny thing is, it works for Windows 95 (using GSAR 5.004_02).
--
Jaime Metcher
Jason V. Robertson~ wrote:
>
> Has anybody else noticed that the NT version of perl (5.004 and above, at
> least) won't do an opendir on a UNC with no subdirectory?
>
> So, for example:
> opendir(IN, "\\\\myserver\\myshare") will not work, but
> opendir(IN, "\\\\myserver\\myshare\\subdir") will work.
>
> Also,
> -d "\\\\myserver\\myshare" won't work
> but
> -d "\\\\myserver\\myshare\\subdir" will work.
>
> Any ideas, or am I doing something stupid?
>
> Thanks,
> Jason
> --
> |Jason V. Robertson <jvrobert@sedona.intel.com> |
> |Not speaking for Intel. |
------------------------------
Date: Tue, 17 Mar 1998 01:41:23 -0500
From: David Boyce <dsb@bit.bucket.org>
Subject: Re: opendir and UNC's in NT
Message-Id: <350E1B13.CB29B1AC@bit.bucket.org>
Jaime Metcher wrote:
>
> Yes:
>
> opendir DH, "//server/share" || die "$!";
>
> gives "Permission denied" on NT 4.0, even for shares with "Full control"
> permissions in both the share and the NTFS.
I'm not in a position to try this but how about:
opendir DH, "//server/share/" || die "$!";
-David
------------------------------
Date: Mon, 16 Mar 1998 23:35:59 -0500
From: kmiles <kmiles@erols.com>
Subject: Re: perl library
Message-Id: <350DFDAF.28C@erols.com>
go to www.perl.com
Vos nom et prinom wrote:
>
> HELLO
>
> We are interested in Perl software which works on PC/Windows95? Where could
> we load it via Net?We have not seen it in uunet or osu-cis.
>
> Thank you very much
>
> DUTOIT
>
> In French:
>
> Bonjour,
>
> Je me permets encore de vous solliciter car nous cherchons ` tilicharger un
> script Perl (version 4 ou 5) fonctionnant sous Windows 95. Nous ne trouvons
> pas ce logiciel chez uunet ou osu-cis.Pourriez-vous nous indiquer oy l'on
> pourrait le trouver?
>
> Merci
>
> Cordialement
>
> DUTOIT
------------------------------
Date: 16 Mar 1998 22:54:15 -0600
From: Tushar Samant <scribble@pobox.com>
Subject: Re: Reference to a part of a hash?
Message-Id: <6ekvln$8ct@tekka.wwa.com>
jgoerzen@southwind.net writes:
>I am wanting to create a reference to an entity in a hash... For
>instance...
>
>%hash = ('asdf' => 'qwerty');
>
>$ref = \{$hash{asdf}};
You probably want
$ref = {asdf => $hash{asdf}};
More generally given @list:
$ref = {map {$_ => $hash{$_}} @list};
------------------------------
Date: 16 Mar 1998 13:25:19 GMT
From: Andy Tompkins <aet@aryth.webplanets.com>
Subject: Telnet control codes, stumped!
Message-Id: <6ej97v$8dt$1@aginor.webplanets.com>
Ok, in the interest of hiding the text of a password, during entry, over a
socket connection, i have come to the conclusion that i should be doing
this through the telnet protocol (thanks Uri!).
Basically this is what im doing now:
$msg = pack('C*', '255', '254', '1');
(255 = interpret as control, 254 = dont, 1 = echo)
$fh->print("password: ");
$fh->send($msg, ???)
where ??? has been MSG_OOB, MSG_OOB | MSG_URG, and 0
$pass = $fh->getline();
then i turn echo back on...
needless to say, none of it works...
so, any ideas?
is this how YOU would be doing this?
or am i missing something in my train of thought?
Also, any idea wy SOME of the socket constants are defined and others not?
i noticed MSG_OOB is, but MSG_URG (0x800) is not...
Could someone PLEASE shed some light on this?
Thanks
--- andy
------------------------------
Date: 16 Mar 1998 23:55:59 -0600
From: psamuels@sampo.REMOVETHIS.creighton.edu (Peter Samuelson)
Subject: Re: The -w switch (was Re: better way to do this?)
Message-Id: <6el39f$m9p$1@sampo.creighton.edu>
[Mike Heins <mikeh@minivend.com>]
> Useless use of MIME award here. Forget your stupid "V-Card." We
> aren't interested.
>
> There is never a reason to post MIME with the only type being
> "charset-us-ascii".
[73 lines of quoted text snipped]
Useless use of quoting award here. Your point is good, and you made it
in four lines of text. What exactly did you think 73 lines of quoted
text would do to help?
--
Peter Samuelson
<sampo.creighton.edu ! psamuels>
------------------------------
Date: Tue, 17 Mar 1998 00:50:07 -0500
From: Benjamin Holzman <bholzman@mail.earthlink.net>
To: Tye McQueen <tyde@medtrodnet.cdom>
Subject: Re: Tied and blessed?
Message-Id: <350E0F0F.BB94A90@mail.earthlink.net>
> _Don't_ use the code I've shown above to try to implement this!
> I think it makes the underlying workings easier to explain, but
> it does the "wrong thing" in too many places.
>
> Perhaps this should be an addition to perlbot.pod? Depends on
> whether this is seen as a neat programming tool or a kludge that
> abuses Perl's machinery. ;> Or this may already be documented
> and I haven't run into it yet [or didn't recognize it].
>
> Comments welcome. I've meant to post this description just to
> see what people thought of it, but I hadn't found the time before.
> --
> Tye McQueen Nothing is obvious unless you are overlooking something
> http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
> Remove d's from address to reply (sorry for the inconvenience).
I once built a tied-array/class package which worked in 5.004_04, and
broke utterly in 5.004_54. I didn't even try to track it down; I just
used two different packages to accomplish my goal. So it may be the
kludge thingy...
Benjamin Holzman
------------------------------
Date: 16 Mar 1998 22:56:11 -0600
From: psamuels@sampo.REMOVETHIS.creighton.edu (Peter Samuelson)
Subject: Re: Why this one doesn't work ?
Message-Id: <6ekvpb$48m$1@sampo.creighton.edu>
[<indhiraa@hotmail.com>]
> I have a PERL program whose first 3 lines are like this:
[...]
> Am I missing anything here.
Yeah. `Perl' is not in all caps. Sure, it was once just an acronym,
but then so was `snafu'. Both have graduated to regular nouns (though
Perl is a proper noun).
--
Peter Samuelson
<sampo.creighton.edu ! psamuels>
P.S. (:
------------------------------
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 2114
**************************************