[18929] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1124 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 13 06:05:31 2001

Date: Wed, 13 Jun 2001 03:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <992426708-v10-i1124@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 13 Jun 2001     Volume: 10 Number: 1124

Today's topics:
        Determing the location of perl in a Perl script <somewhere@in.paradise.net>
    Re: Determing the location of perl in a Perl script <pne-news-20010613@newton.digitalspace.net>
        efficient change file with locking? <twanGEENSPAM@twansoft.com>
    Re: efficient change file with locking? (Anno Siegel)
    Re: efficient change file with locking? <twanGEENSPAM@twansoft.com>
    Re: efficient change file with locking? (Anno Siegel)
    Re: help with regexp? <gnarinn@hotmail.com>
        Imager::Plot v0.03 Released. <addi@umich.edu>
        is there a windows installer for perl ? <ivanmarkose@hotmail.com>
    Re: is there a windows installer for perl ? <keng@spinalfluid.com>
    Re: is there a windows installer for perl ? <ivanmarkose@hotmail.com>
    Re: Perl "html Tables" <martin.cassidy@uk.sun.com>
    Re: perl script runs twice <c_clarkson@hotmail.com>
        PIng status ? <martin.cassidy@uk.sun.com>
    Re: PIng status ? (Bernard El-Hagin)
    Re: PIng status ? <admin@the-piper.net>
        Problem with nph-script <Andreas.Riese@Informatik.Uni-Oldenburg.DE>
    Re: Scoping problem (Anno Siegel)
        spawnv() in Perl? <clpl@snakefarm.org>
    Re: spawnv() in Perl? (Rasputin)
        test <David.Hiskiyahu@alcatel.be>
    Re: test (Bernard El-Hagin)
    Re: What is ${'string'} ? <pne-news-20010613@newton.digitalspace.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 13 Jun 2001 18:19:01 +1000
From: "Tintin" <somewhere@in.paradise.net>
Subject: Determing the location of perl in a Perl script
Message-Id: <omFV6.18$ms4.1011805@news.interact.net.au>

I'm writing a Perl script that does a syntax check of another script, ie:
perl -cw script

What I need to know is whether there is a portable way to know the location
of the perl binary from inside a perl script?  I've looked through the
special variables and can't see anything obvious.  I know for a Unix script,
I could parse the she bang line, but that's obviously not portable to non
Unix systems.

Ideas?




------------------------------

Date: Wed, 13 Jun 2001 11:49:17 +0200
From: Philip Newton <pne-news-20010613@newton.digitalspace.net>
Subject: Re: Determing the location of perl in a Perl script
Message-Id: <6kdeitsiunj0o313bfamsm6am5r5g6rvmi@4ax.com>

On Wed, 13 Jun 2001 18:19:01 +1000, "Tintin" <somewhere@in.paradise.net>
wrote:

> What I need to know is whether there is a portable way to know the location
> of the perl binary from inside a perl script?  I've looked through the
> special variables and can't see anything obvious.

Look through them again. Look especially at the one called $^X :-)

(Well, that's the location of *a* perl binary; specifically, the one
that is interpreting the current script -- and from what I read ("from
C's argv[0]") it may only be the binary's idea of what it's called but
could theoretically be spoofed, and/or it may not contain a full path[1]
if the local C library doesn't put the full path in argv[0]. But it's
probably OK in practice.)

Cheers,
Philip

[1] This bit is also documented in `perldoc perlvar`.
-- 
Philip Newton <nospam.newton@gmx.li>
Yes, that really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.


------------------------------

Date: Wed, 13 Jun 2001 09:56:50 +0200
From: Twan Kogels <twanGEENSPAM@twansoft.com>
Subject: efficient change file with locking?
Message-Id: <kp6eitsmbdp2qdkaofdae3cipj2l98euam@4ax.com>

I need to change a couple lines in a file, the perlfaq gives me a
example on how i should do that. But there's a problem with that
example:
----
$old = $file;

    $new = "$file.tmp.$$";
    $bak = "$file.orig";
    open(OLD, "< $old")         or die "can't open $old: $!";
    open(NEW, "> $new")         or die "can't open $new: $!";
    # Correct typos, preserving case
    while (<OLD>) {
        s/\b(p)earl\b/${1}erl/i;
        (print NEW $_)          or die "can't write to $new: $!";
    }
    close(OLD)                  or die "can't close $old: $!";
    close(NEW)                  or die "can't close $new: $!";

# with locking on another process could read one of the files excactly
here

    rename($old, $bak)          or die "can't rename $old to $bak:
$!";
    rename($new, $old)          or die "can't rename $new to $old:
$!";
----

This is the version without lock feature. But when i use locking it
still can go very wrong, because between the last close() call and the
first rename() call another proces could read the file. And because i
sometimes have more then 5 hits per second the chances of going wrong
are high.

Is there a solution for this problem?

Best regards,
Twan


------------------------------

Date: 13 Jun 2001 08:17:09 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: efficient change file with locking?
Message-Id: <9g77i5$ftk$1@mamenchi.zrz.TU-Berlin.DE>

According to Twan Kogels  <twanGEENSPAM@twansoft.com>:
> I need to change a couple lines in a file, the perlfaq gives me a
> example on how i should do that. But there's a problem with that
> example:
> ----
> $old = $file;
> 
>     $new = "$file.tmp.$$";
>     $bak = "$file.orig";
>     open(OLD, "< $old")         or die "can't open $old: $!";
>     open(NEW, "> $new")         or die "can't open $new: $!";
>     # Correct typos, preserving case
>     while (<OLD>) {
>         s/\b(p)earl\b/${1}erl/i;
>         (print NEW $_)          or die "can't write to $new: $!";
>     }
>     close(OLD)                  or die "can't close $old: $!";
>     close(NEW)                  or die "can't close $new: $!";
> 
> # with locking on another process could read one of the files excactly
> here
> 
>     rename($old, $bak)          or die "can't rename $old to $bak:
> $!";
>     rename($new, $old)          or die "can't rename $new to $old:
> $!";
> ----
> 
> This is the version without lock feature. But when i use locking it
> still can go very wrong, because between the last close() call and the
> first rename() call another proces could read the file. And because i
> sometimes have more then 5 hits per second the chances of going wrong
> are high.
> 
> Is there a solution for this problem?

In a Unix-ish environment it's easy: just keep the files open (and
the lock in place) until after the rename.  You can rename an open
file.

Anno


------------------------------

Date: Wed, 13 Jun 2001 11:06:01 +0200
From: Twan Kogels <twanGEENSPAM@twansoft.com>
Subject: Re: efficient change file with locking?
Message-Id: <llaeitoudarqgum14liffio4pvgdt4c4du@4ax.com>

On 13 Jun 2001 08:17:09 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno
Siegel) wrote:


>> 
>> This is the version without lock feature. But when i use locking it
>> still can go very wrong, because between the last close() call and the
>> first rename() call another proces could read the file. And because i
>> sometimes have more then 5 hits per second the chances of going wrong
>> are high.
>> 
>> Is there a solution for this problem?
>
>In a Unix-ish environment it's easy: just keep the files open (and
>the lock in place) until after the rename.  You can rename an open
>file.
>
Thanks, great news! Should the following code run without locking
problems on a unix bsd machine?

------
$old = $file;
$new = "$file.tmp.$$";
$bak = "$file.orig";
open(OLD, "< $old")         or die "can't open $old: $!";
open(NEW, "> $new")         or die "can't open $new: $!";

flock(OLD, 2);

# Correct typos, preserving case
while (<OLD>) 
{
	s/\b(p)earl\b/${1}erl/i;
	(print NEW $_)          or die "can't write to $new: $!";
}

rename($old, $bak)          or die "can't rename $old to $bak: $!";
rename($new, $old)          or die "can't rename $new to $old: $!";

close(OLD)                  or die "can't close $old: $!";
close(NEW)                  or die "can't close $new: $!";
------

Should i also lock the NEW filehandle or is that not necessary?

Thanks for the support,
Twan


------------------------------

Date: 13 Jun 2001 09:22:17 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: efficient change file with locking?
Message-Id: <9g7bc9$kd1$2@mamenchi.zrz.TU-Berlin.DE>

According to Twan Kogels  <twanGEENSPAM@twansoft.com>:
> On 13 Jun 2001 08:17:09 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno
> Siegel) wrote:
> 
> 
> >> 
> >> This is the version without lock feature. But when i use locking it
> >> still can go very wrong, because between the last close() call and the
> >> first rename() call another proces could read the file. And because i
> >> sometimes have more then 5 hits per second the chances of going wrong
> >> are high.
> >> 
> >> Is there a solution for this problem?
> >
> >In a Unix-ish environment it's easy: just keep the files open (and
> >the lock in place) until after the rename.  You can rename an open
> >file.
> >
> Thanks, great news! Should the following code run without locking
> problems on a unix bsd machine?
 
I see a few problems.

> ------
> $old = $file;
> $new = "$file.tmp.$$";
> $bak = "$file.orig";
> open(OLD, "< $old")         or die "can't open $old: $!";
> open(NEW, "> $new")         or die "can't open $new: $!";
> 
> flock(OLD, 2);

Don't use hard coded values for the flock flag.  "use Fcntl ':flock'"
will give you the system-independent LOCK_EX instead.

You will also want secure exclusive access to both files, because
part of the time $old is the one that would be opened by a concurring
process, and part of the time it's $new.  This means you may have
to open $old for both reading and writing (even if you don't write
to it) because many systems don't give you an exclusive lock for
a file that's only open for reading.

> # Correct typos, preserving case
> while (<OLD>) 
> {
> 	s/\b(p)earl\b/${1}erl/i;
> 	(print NEW $_)          or die "can't write to $new: $!";
> }
> 
> rename($old, $bak)          or die "can't rename $old to $bak: $!";
> rename($new, $old)          or die "can't rename $new to $old: $!";
> 
> close(OLD)                  or die "can't close $old: $!";
> close(NEW)                  or die "can't close $new: $!";
> ------
> 
> Should i also lock the NEW filehandle or is that not necessary?

Yes, see above.

Anno


------------------------------

Date: Wed, 13 Jun 2001 08:58:08 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: help with regexp?
Message-Id: <992422688.0226803002879024.gnarinn@hotmail.com>

In article <m3lmmxlbw6.fsf@dhcp9-173.support.tivoli.com>,
Ren Maddox  <ren@tivoli.com> wrote:
>On 12 Jun 2001, oooozaaaa@yahoo.com wrote:
>
[snipped Apache mod_rewrite regex question]

>
>As written, neither will work because of the overuse of "/".  Also, I
>don't know the significance of the "[L,R]" at the end.
>
> s{/top/([^/\s]*)/([^/\s]*)/([^/\s]*)}
>  {/$1.php?mode=$2&id=$3}g
>
>Restricting the matches to "[^/\s]" allows you to more readily handle
>multiple substitutes at a time if the URLs are embedded within other
>text.  If you use ".*?" instead, then any URLs that are too short will
>lead to a bunch of extra text being included.  Of course, if there is
>no other text, then this will not be a problem.
>

after a quick look at the mod_rewrite docs, it seems to me that
this has nothing to do with perl at all, so advice from here is
likely to be wrong or misleading.

I dont think the .*? syntax means the same thing as in perl.
neither \s in regexes

I think the OP's first example was correct

gnari


------------------------------

Date: Wed, 13 Jun 2001 09:47:37 GMT
From: Arnar M Hrafnkelsson <addi@umich.edu>
Subject: Imager::Plot v0.03 Released.
Message-Id: <m366e067c3.fsf@steypa.ast.is>

This is the first release of this plotting module.  It uses Imager as
the engine to draw things.  It's design (!?) should be pretty
versatile but lots of work remains to be done.  This is pretty much a
work in progress which is being released so people can express
opinions on things like api and such.  Due to the alpha status the
module is not yet on CPAN but later versions of it will be CPAN
releases.  The module for now can only be downloaded of the homepage:

http://www.eecs.umich.edu/~addi/perl/Plot/

-- Enjoy, Arnar


------------------------------

Date: Wed, 13 Jun 2001 15:21:43 +0800
From: "ivan markose" <ivanmarkose@hotmail.com>
Subject: is there a windows installer for perl ?
Message-Id: <3b271425@news.starhub.net.sg>

I'd like to know if there is a package to install perl
on windows, not binaries that I don't know the head
or tail of. I found this very good book - Mastering
algorithms with Perl that I would like to learn from.
Again what I have in mind is along the lines of
the python installer for windows.

Thanks
Ivan Markose






------------------------------

Date: Wed, 13 Jun 2001 17:19:21 +0800
From: "keng" <keng@spinalfluid.com>
Subject: Re: is there a windows installer for perl ?
Message-Id: <9g7b5g$gg2$1@dahlia.singnet.com.sg>

hi

u really should look again at the binaries else u will have to make ur own
like in unix environment
try http://www.netcat.co.uk/rob/perl/win32perltut.html
it may have some quick answers to ur questions on how to install perl on win

summary of what i read is
1)goto www.activestate.com
2)download instmsi.exe and run it (if using win98 & below)
3) then download ActivePerl-5.6.0.623-MSWin32-x86-multi-thread.msi and
install it
4) test run a helloWorld script
good luck and may the force be with you

--
regards
isaac
"ivan markose" <ivanmarkose@hotmail.com> wrote in message
news:3b271425@news.starhub.net.sg...
> I'd like to know if there is a package to install perl
> on windows, not binaries that I don't know the head
> or tail of. I found this very good book - Mastering
> algorithms with Perl that I would like to learn from.
> Again what I have in mind is along the lines of
> the python installer for windows.
>
> Thanks
> Ivan Markose
>
>
>
>




------------------------------

Date: Wed, 13 Jun 2001 17:53:42 +0800
From: "ivan markose" <ivanmarkose@hotmail.com>
Subject: Re: is there a windows installer for perl ?
Message-Id: <3b2737ef@news.starhub.net.sg>


hi Isaac,
Thanks for pointing out that its really the binaries I should
be looking at. What I had wanted to avoid was the nmake dmake
stuff which I dont have a handle on. The activestate   .msi package
is  indeed what I was looking for.

Yoda's blessings on you.

Thanks
Ivan Markose


"keng" <keng@spinalfluid.com> wrote in message
news:9g7b5g$gg2$1@dahlia.singnet.com.sg...
> hi
>
> u really should look again at the binaries else u will have to make ur own
> like in unix environment





------------------------------

Date: Wed, 13 Jun 2001 09:32:58 +0100
From: martin cassidy <martin.cassidy@uk.sun.com>
Subject: Re: Perl "html Tables"
Message-Id: <3B27253A.20F219E5@uk.sun.com>

Hi All,

Thanks for the feedback, i mangaged to get the script written and its
looking good.


Cheers

Martin

Ren Maddox wrote:
> 
> On Tue, 12 Jun 2001, martin.cassidy@uk.sun.com wrote:
> 
> > Hi all,
> >
> > I am trying to write a web page where i ping, arp and rup some
> > machines and return the data to a page in table format.  My problem
> > is when i run the ping command i get the info ok in column 1 but i
> > cannot get the arp and rup data to display in the correct columns.
> > Any Ideas !  My code is below :-
> >
> [Perl & HTML snipped for brevity]
> >
> > I am not sure if the HTML is correct, infact is probably wrong for
> > what i want to do, all i want is the perl to read a list of machines
> > and ping arp and rup each of them.
> 
> The two biggest problems I see are:
> 
>  1) You're not even calling arp or rup.
>  2) You're not parsing the output of ping (or the others, presumably),
>     so it doesn't really get formatted.  You might be able to get
>     around this, but that would require outputting the appropriate
>     tags before and between each system call.  And watch out for IO
>     buffering!
> 
> Based on this snippet:
> 
> > print "<TR><TR><TH>$key<TD>$formdata{key}\n\n";
> >
> > system ("ping $key.uk")}
> 
> You might want something like
> 
>     print "<TD>";
>     system "ping $key.uk";
>     print "</TD><TD>";
>     system "arp -a $key.uk";
>     print "</TD><TD>";
>     system "rup $key.uk";
>     print "</TD>";
> 
> --
> Ren Maddox
> ren@tivoli.com


------------------------------

Date: Wed, 13 Jun 2001 02:05:37 -0500
From: "Charles K. Clarkson" <c_clarkson@hotmail.com>
Subject: Re: perl script runs twice
Message-Id: <56787D77ED653A0B.6E665C32B8F9B1F7.7C6F5137513D90D3@lp.airnews.net>

chris <ccc2@lehigh.edu> wrote
: I have a perl script acting as a CGI, and
: when I run it in IE 5.5, it runs twice for
: no discernable reason.  It works fine in
: IE 5.0, does anybody have any idea why 5.5
: could be making it run twice, and how I
: could make it stop?

    Not without seeing the script, Chris. It
might be helpful if you provided a link so
we could test it too.

HTH,
Charles K. Clarkson
Clarkson Energy Homes, Inc.

My forehead has a hand-shaped imprint on it.






------------------------------

Date: Wed, 13 Jun 2001 09:41:16 +0100
From: martin cassidy <martin.cassidy@uk.sun.com>
Subject: PIng status ?
Message-Id: <3B27272C.4153CDC3@uk.sun.com>

Hi all, 


Could any one let me know how to grab the return code of a ping command
ie 0 for successful and any other number for ping failure in a script im
working on ?



MY CODE :


@hosts= qw (server1 server2 server3);

$pingstatus = "$?";
$domain = ".uk";

foreach $host (@hosts)
{

$ping = `/usr/sbin/ping $host$domain`;


if ($pingstatus < 0 )
{
do stuff ...
}

else 
{
do stuff ...
}


Cheers for any help !

Martin


------------------------------

Date: Wed, 13 Jun 2001 09:14:14 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: PIng status ?
Message-Id: <slrn9ieav4.k93.bernard.el-hagin@gdndev25.lido-tech>

On Wed, 13 Jun 2001 09:41:16 +0100, martin cassidy <martin.cassidy@uk.sun.com>
wrote:
>Hi all, 
>
>
>Could any one let me know how to grab the return code of a ping command
>ie 0 for successful and any other number for ping failure in a script im
>working on ?
>
>
>
>MY CODE :
>
>
>@hosts= qw (server1 server2 server3);
>
>$pingstatus = "$?";
>$domain = ".uk";
>
>foreach $host (@hosts)
>{
>
>$ping = `/usr/sbin/ping $host$domain`;

Instead of backticks use the system command:

perldoc -f system

Please note the part of that doc which talks about the value
returned by system as it may not be exactly what you expect.

Cheers,
Bernard
--
perl -l54e's yyw q q tvmrx "h\ywx ersxliv zivp legoiv"qiy;y #a-zA-Z#d-gu-z#
chefghijklmnopqrstuvwxyzcJab-def-uPwxyzc;s j j s u u s t t s r r s
ppevalpereeteueje'


------------------------------

Date: Wed, 13 Jun 2001 09:40:05 GMT
From: "Tom Klinger" <admin@the-piper.net>
Subject: Re: PIng status ?
Message-Id: <VxGV6.14185$cF.310703@news1.nokia.com>


"martin cassidy" <martin.cassidy@uk.sun.com> wrote in message
news:3B27272C.4153CDC3@uk.sun.com...
> Hi all,
>
>
> Could any one let me know how to grab the return code of a ping command
> ie 0 for successful and any other number for ping failure in a script im
> working on ?
>
>

May I suggest you to use Net::Ping?
Information about is available here:
http://search.cpan.org/doc/RMOSE/Net-Ping-2.02/Ping.pm

Hope this helps.

Cheers, Tom




------------------------------

Date: 13 Jun 2001 11:48:19 +0200
From: "Andreas Riese" <Andreas.Riese@Informatik.Uni-Oldenburg.DE>
Subject: Problem with nph-script
Message-Id: <9g7ct3$5ni@news.Informatik.Uni-Oldenburg.DE>

Hi,
I've written an nph-script which should print the output line by
line in the browser, while the script ist still running. This works
fine in Netscape browsers but doesn't work in Internet Explorer
on Mac OS (but it works on Windows 98).

Has anybody had this problem before? Does anybody know a solution?

The script works like this:

use CGI;

print $query->header(-nph => 1);
$| = 1;

print "<html><head>"; 
 ...

the filename begins with 'nph-' and the webserver is an Apache.

As I wrote before it works fine unter Netscape browsers.

TIA,
Andreas
-- 
+    mailto:ar@andreas-riese.de  |  http://www.andreas-riese.de     +
+ "Real Life (TM) is a multi user dungeon you enter by logging off" +


------------------------------

Date: 13 Jun 2001 09:00:29 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Scoping problem
Message-Id: <9g7a3d$kd1$1@mamenchi.zrz.TU-Berlin.DE>

According to  <ctcgag@hotmail.com>:
> I thought I was vaguely competent at perl, but this is giving me
> problems:
> 
> #!/usr/bin/perl   -w
> use strict;
> my @t = ( qw{g b n k l o p} ) ;
> 
> for ( my $i = 0 ; $i<= $#t ;$i++  )  {
>   my $file = $t[$i];
>   print "starting $file\n" ;
>   # do stuff
>   add_data("first");
>   # do stuff
>   add_data("now_error");
> 
>   sub add_data {
>     my $label=shift or die;
>     print "Processing $file $label\n";
>     # do stuff;
>     if ( $label eq "now_error" ) {           # pretend there is an error
>       warn "Error in file $file during $label\n" ;
>     } ;
>   } ;
> 
> } ;
> 
> starting g
> Processing g first
> Processing g now_error
> Error in file g during now_error
> starting b
> Processing g first
> Processing g now_error
> Error in file g during now_error

[more output snipped]
 
> The sub is declared within the lexical scope of the my $file declaration,
> so I thought it should be able to access the value of $file

The sub add_data is statically compiled.  What it sees as the
variable $file is the one that is created at compile time, which
is also the one used in the loop the first time through.  When
the loop passes though "my $file" again, it creates a new variable,
but add_data doesn't know about that.

> From perlsub --Begin--
> This doesn't mean that a my() variable declared in a
> statically enclosing lexical scope would be invisible.
> Only the dynamic scopes are cut off.   For example, the
> bumpx() function below has access to the lexical $x
> variable because both the my and the sub occurred at the
> same scope, presumably the file scope.
> 
> my $x = 10;
> sub bumpx { $x++ }
> 
> --End--
> 
> 
> It looks like the value of $file when the sub is first called is
> getting locked in, as if it were a closure.
 
Without wanting to engage in a semantic analysis of "closure:,
you want add_data to behave more like a closure, so that it
captures the value of $file each time through the loop.  It
does that if you make it an anonymous coderef.  For obvious
reasons, the definition of add_data must now be moved before
the place it is called, so your loop might look like this:

for ( my $i = 0 ; $i<= $#t ;$i++  )  {
  my $file = $t[$i];
  print "starting $file\n" ;

  my $add_data = sub {
    my $label=shift or die;
    print "Processing $file $label\n";
    # do stuff;
    if ( $label eq "now_error" ) {           # pretend there is an error
      warn "Error in file $file during $label\n" ;
    } ;
  } ;

  # do stuff
  $add_data->("first");
  # do stuff
  $add_data->("now_error");

} ;

Anno


------------------------------

Date: Wed, 13 Jun 2001 10:15:39 +0200
From: Carsten Gaebler <clpl@snakefarm.org>
Subject: spawnv() in Perl?
Message-Id: <3B27212B.EED001FF@snakefarm.org>

Is there a Perl module that implements the C library's spawnv() function?

Regards
Carsten.


------------------------------

Date: Wed, 13 Jun 2001 09:29:45 GMT
From: rasputin@shaft.techsupport.co.uk (Rasputin)
Subject: Re: spawnv() in Perl?
Message-Id: <slrn9iecjl.2v1m.rasputin@shaft.techsupport.co.uk>

In article <3B27212B.EED001FF@snakefarm.org>, Carsten Gaebler wrote:
> Is there a Perl module that implements the C library's spawnv() function?

Depends. What does spawnv() do?
Don't think it's a standard library call.

-- 
"These are the propulsion systems used by NASA for the moonshots,"
		said Tom apologetically. 
Rasputin :: Jack of All Trades - Master of Nuns ::


------------------------------

Date: Wed, 13 Jun 2001 10:23:41 +0200
From: David Hiskiyahu <David.Hiskiyahu@alcatel.be>
Subject: test
Message-Id: <3B27230D.EE5D887E@alcatel.be>

Ignore this message.


------------------------------

Date: Wed, 13 Jun 2001 09:14:51 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: test
Message-Id: <slrn9ieb08.k93.bernard.el-hagin@gdndev25.lido-tech>

On Wed, 13 Jun 2001 10:23:41 +0200, David Hiskiyahu
<David.Hiskiyahu@alcatel.be> wrote:
>Ignore this message.

OK.

Cheers,
Bernard
--
perl -l54e's yyw q q tvmrx "h\ywx ersxliv zivp legoiv"qiy;y #a-zA-Z#d-gu-z#
chefghijklmnopqrstuvwxyzcJab-def-uPwxyzc;s j j s u u s t t s r r s
ppevalpereeteueje'


------------------------------

Date: Wed, 13 Jun 2001 11:13:59 +0200
From: Philip Newton <pne-news-20010613@newton.digitalspace.net>
Subject: Re: What is ${'string'} ?
Message-Id: <nhbeit0ku9sa8ii63e098qscuc94agm07g@4ax.com>

On Wed, 13 Jun 2001 00:07:03 GMT, "Todd Smith" <todd@designsouth.net>
wrote:

> how's it different?

Try that again using 'use strict' and 'my $a'. You'll get

: Can't use string ("a") as a SCALAR ref while "strict refs" in use at - line 2.

due to the ${'a'}. And if you don't 'use strict' (but do use -w), you'll
get

: Use of uninitialized value in concatenation (.) at - line 2.
: Use of uninitialized value in concatenation (.) at - line 2.
: 123456
: 12356
: 12356

As the output. ${a} can represent the lexical variable $a, but ${'a'}
only works on $a if $a is a global variable that lives in a symbol
table, because ${'a'} is a symref.

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.li>
Yes, that really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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.

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 V10 Issue 1124
***************************************


home help back first fref pref prev next nref lref last post