[29723] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 967 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 23 00:09:41 2007

Date: Mon, 22 Oct 2007 21:09:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 22 Oct 2007     Volume: 11 Number: 967

Today's topics:
    Re: cgi_bin <tadmc@seesig.invalid>
    Re: cgi_bin <tadmc@seesig.invalid>
    Re: cgi_bin <tadmc@seesig.invalid>
    Re: cgi_bin <stoupa@practisoft.cz>
        control loop for contraction <zaxfuuq@invalid.net>
        Deleting array element does not change the array size. <seannakasone@yahoo.com>
    Re: Deleting array element does not change the array si xhoster@gmail.com
    Re: Deleting array element does not change the array si <stoupa@practisoft.cz>
    Re: generating html form on the fly xhoster@gmail.com
    Re: generating html form on the fly <glex_no-spam@qwest-spam-no.invalid>
    Re: generating html form on the fly <tadmc@seesig.invalid>
    Re: generating html form on the fly <glennj@ncf.ca>
    Re: net::sftp write error with multiple packet writes <glex_no-spam@qwest-spam-no.invalid>
        OT Ink and Incapability. Was Re: perl standard <RedGrittyBrick@SpamWeary.foo>
    Re: splitting a line <tadmc@seesig.invalid>
    Re: splitting a line <zaxfuuq@invalid.net>
        Unix BG and Perl/TK <dodge1942@gmail.com>
    Re: Unix BG and Perl/TK <elvis-85473@notatla.org.uk>
    Re: Unix BG and Perl/TK <ben@morrow.me.uk>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 22 Oct 2007 22:10:23 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: cgi_bin
Message-Id: <slrnfhq7gs.kln.tadmc@tadmc30.sbcglobal.net>

Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
> Charlton Wilbur wrote:
>>>>>>> "GH" == Gunnar Hjalmarsson <noreply@gunnar.cc> writes:
>> 
>>     GH> Charlton Wilbur wrote:
>> 
>>     >> (Your inability to find such a forum that will answer your
>>     >> question is not justification for asking it here, either.)
>> 
>>     GH> Even if we don't know anything about the OPs ability in that
>>     GH> respect, I'd say that the lack of a more appropriate Usenet
>>     GH> group _does_ justify him asking it here.


> And if you had been a little more attentive, and read the whole thread 
> before you posted, you had noticed that I - in my reply to Tad - pointed 
> out that the group in question has been out of order for more than a year.


So if the garbage man, errr, I mean the waste management personnel
won't take my old mattress away, then it is OK to just dump it anywhere?

The lack of somewhere else to ask web server configuration questions
does not mean that it is OK to post non-Perl questions in the
Perl newsgroup.


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Mon, 22 Oct 2007 22:10:24 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: cgi_bin
Message-Id: <slrnfhq7k5.kln.tadmc@tadmc30.sbcglobal.net>

Charlton Wilbur <cwilbur@chromatico.net> wrote:
>>>>>> "GH" == Gunnar Hjalmarsson <noreply@gunnar.cc> writes:
>
>    GH> And if you had been a little more attentive, and read the
>    GH> whole thread before you posted, you had noticed that I - in my
>    GH> reply to Tad - pointed out that the group in question has been
>    GH> out of order for more than a year.
>
> What does that have to do with anything?  There's a more appropriate
> place to post the question, and there's no Perl content in the
> question.  Does the appropriate place not functioning suddenly excuse
> a total lack of Perl content?
>
> If that's the case, I'd love to ask some questions about roleplaying
> games here (as rec.games.frp.moderated is nonfunctional) and knitting
> (as I can't find a knitting-specific newsgroup).  By your logic, both
> of those should be perfectly fine, no?


The 2nd one would be be OK only if you were using a purl stitch.

:-)


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Mon, 22 Oct 2007 20:05:04 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: cgi_bin
Message-Id: <slrnfhqi60.mkf.tadmc@tadmc30.sbcglobal.net>

Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
> Abigail wrote:
>> Gunnar Hjalmarsson (noreply@gunnar.cc) wrote on VCLXIV September MCMXCIII
>> in <URL:news:5o1tnrFkpgh4U1@mid.individual.net>:
>> &&  
>> &&  I'd say that the lack of a more appropriate Usenet group _does_ justify 
>> &&  him asking it here.


But he does not have a question about the Perl programming language,
which is the topic of this newsgroup.

Defending off-topic posting is a futile postion to take...


> Unfortunately this discussion is not about linguistic semantics. 


And neither is it about Perl.

It is about web server configuration.

If the OP chose to use Python instead, the answer to his
question would be *exactly the same*.

The answer is independant of programming language, hence cannot
be on topic in a newsgroup about a particular programming language.


> It's 
> actually caused by some regulars' disinterest in CGI and in giving those 
> who want to use Perl for CGI apps a helping hand with the CGI side of 
> it.


I'm one of the "other" regulars then, as I don't mind helping with
a CGI application written in Perl.

What I do mind is off-topic posts whose answer is unchanged
when you substitute "Python" or "PHP" for "Perl".


> However, if a newbie would ask for my advice on which language is best 
> to learn for web stuff, I think I would answer PHP. 


And that would be the right answer.

PHP was created specifically for "web stuff", so it should
be expected to be good at web stuff.


> Not because I 
> personally have a firm opinion on which language is best suited for the 
> area, but because I imagine that there is no similar 'anti-web attitude' 
> in the groups and forums that deal with PHP.


When you find a thread that serves as an example of what you're
speaking of, point it out.

This thread is clearly not such an example, as his question has
no relationship to the Perl programming language.


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Tue, 23 Oct 2007 04:02:15 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: cgi_bin
Message-Id: <ffjkvq$1f9p$2@ns.felk.cvut.cz>

Charlton Wilbur wrote:
>>>>>> "GH" == Gunnar Hjalmarsson <noreply@gunnar.cc> writes:
>
> If that's the case, I'd love to ask some questions about roleplaying
> games here (as rec.games.frp.moderated is nonfunctional) and knitting
> (as I can't find a knitting-specific newsgroup).  By your logic, both
> of those should be perfectly fine, no?
>
If the game is written in Perl, then here is a good place I think :-)
-- 

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail 
from another non-spammer site please.)





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

Date: Thu, 22 Nov 2007 18:30:58 -0800
From: "Wade Ward" <zaxfuuq@invalid.net>
Subject: control loop for contraction
Message-Id: <S96dnSemQ4Uj3YDanZ2dnUVZ_hGdnZ2d@comcast.com>


I would like to use a control loop to achieve the maximum width on the 
following contraction:

I'm trying to calculate an x s.t. 10 = (2**x )*1600.  bank4.pl has x at 6.5, 
which is too low:

# bank4.pl
use strict;
use warnings;

# a cup is a twelfth of a quart
my $number1 = 42;
my $no2 = 2.71;

print STDOUT "no 1 is $number1\n";
print STDOUT "no 2 is $no2\n";

#US cup = 236.588238 cc
#1 centimeters = 0.393700787 inches

my $cups_to_cc = 236.588238;

my $cent_to_inch = 0.393700787;
# line 16 Semicolon seems to be missing at sugar3.pl line 16.
print STDOUT "no 3 is $cups_to_cc\n";
print STDOUT "no 4 is $cent_to_inch\n";

my $no5 = 3;
my $no6 = 4**$no5;

print STDOUT "no 5 is $no5\n";
print STDOUT "no 6 is $no6\n";

my $no7 = $cups_to_cc * ($cent_to_inch**$no5);
print STDOUT "no 7 is $no7\n";


my $no7 = 7.5;
my $no8 = 2**$no7;
my $no9 = 10*$no8;

print STDOUT "no 5 7is $no7\n";
print STDOUT "no 68 is $no8\n";
print STDOUT "no 9 is $no9\n";

# perl bank4.pl 2>text55.txt >text56.txt
# end script beigin putput
no 1 is 42
no 2 is 2.71
no 3 is 236.588238
no 4 is 0.393700787
no 5 is 3
no 6 is 64
no 7 is 14.4375000473569
no 5 7is 6.5
no 68 is 90.5096679918781
no 9 is 905.096679918781

bank5.pl comes in too high with x at 7.5 and a result of 1800.
#bank5.pl
use strict;
use warnings;

# a cup is a twelfth of a quart
my $number1 = 42;
my $no2 = 2.71;

print STDOUT "no 1 is $number1\n";
print STDOUT "no 2 is $no2\n";

#US cup = 236.588238 cc
#1 centimeters = 0.393700787 inches

my $cups_to_cc = 236.588238;

my $cent_to_inch = 0.393700787;
# line 16 Semicolon seems to be missing at sugar3.pl line 16.
print STDOUT "no 3 is $cups_to_cc\n";
print STDOUT "no 4 is $cent_to_inch\n";

my $no5 = 3;
my $no6 = 4**$no5;

print STDOUT "no 5 is $no5\n";
print STDOUT "no 6 is $no6\n";

my $no7 = $cups_to_cc * ($cent_to_inch**$no5);
print STDOUT "no 7 is $no7\n";


my $no7 = 6.5;
my $no8 = 2**$no7;
my $no9 = 10*$no8;

print STDOUT "no 5 7is $no7\n";
print STDOUT "no 68 is $no8\n";
print STDOUT "no 9 is $no9\n";

# perl bank5.pl 2>text55.txt >text56.txt
#end source begin output
no 1 is 42
no 2 is 2.71
no 3 is 236.588238
no 4 is 0.393700787
no 5 is 3
no 6 is 64
no 7 is 14.4375000473569
no 5 7is 7.5
no 68 is 181.019335983756
no 9 is 1810.19335983756
# end out begin comment

So x is gonna be between 7.3 and 7.35.

How do I do the contraction to the full width of the datatype?
-- 
wade ward
wade@zaxfuuq.net
"Der Katze tritt die Treppe hoch;  Der Kater tritt sie krumm.%
% De Teufel geit um; er bringt de menschen allet dumm."
schau, schau




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

Date: Mon, 22 Oct 2007 15:39:27 -1000
From: Sean Nakasone <seannakasone@yahoo.com>
Subject: Deleting array element does not change the array size.
Message-Id: <Pine.WNT.4.64.0710221538450.1592@ctfanxnfba.unjnvvnaryrpgevp.arg>

Below I have a simple script that will build an array then delete an 
element from it.  After deleting the element, the size of the array still 
remains the same.  I'm a perl newbie and would like to know the correct 
way to delete an array element and to obtain the new array size.

use strict;
use warnings;

my @arr = (1, 2, 3);
print @arr;    # outputs "123"
my $size = @arr;
print "\nsize=$size\n";
delete $arr[1];
print @arr;   # outputs "13"
$size = @arr;
print "\nsize=$size\n";  # this is still 3, why??



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

Date: 23 Oct 2007 01:44:00 GMT
From: xhoster@gmail.com
Subject: Re: Deleting array element does not change the array size.
Message-Id: <20071022214403.713$Dp@newsreader.com>

Sean Nakasone <seannakasone@yahoo.com> wrote:
> Below I have a simple script that will build an array then delete an
> element from it.  After deleting the element, the size of the array still
> remains the same.  I'm a perl newbie and would like to know the correct
> way to delete an array element and to obtain the new array size.

from perldoc -f delete:

                                                           Note
               that deleting array elements in the middle of an
               array will not shift the index of the ones after
               them down--use splice() for that.

So, you would use splice for that.


>
> use strict;
> use warnings;
>
> my @arr = (1, 2, 3);
> print @arr;    # outputs "123"
> my $size = @arr;
> print "\nsize=$size\n";
> delete $arr[1];

splice @arr, 1, 1;

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.


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

Date: Tue, 23 Oct 2007 03:52:18 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: Deleting array element does not change the array size.
Message-Id: <ffjkvq$1f9p$1@ns.felk.cvut.cz>

Sean Nakasone wrote:
> Below I have a simple script that will build an array then delete an
> element from it.  After deleting the element, the size of the array
> still remains the same.  I'm a perl newbie and would like to know the
> correct way to delete an array element and to obtain the new array
> size.
> use strict;
> use warnings;
>
> my @arr = (1, 2, 3);
> print @arr;    # outputs "123"
> my $size = @arr;
> print "\nsize=$size\n";
> delete $arr[1];
> print @arr;   # outputs "13"
> $size = @arr;
> print "\nsize=$size\n";  # this is still 3, why??

splice is the right keyword :-)

use strict;
use warnings;
my @arr = (1, 2, 3);
print @arr;    # outputs "123"
my $size = @arr;
print "\nsize=$size\n";
#######################
splice @arr,1,1;
#######################
print @arr;   # outputs "13"
$size = @arr;
# line above could be: $size = $#arr;
print "\nsize=$size\n";  # this is still 3, why??

-- 

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail 
from another non-spammer site please.)




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

Date: 22 Oct 2007 23:01:57 GMT
From: xhoster@gmail.com
Subject: Re: generating html form on the fly
Message-Id: <20071022190200.327$dg@newsreader.com>

ll <barn104_1999@yahoo.com> wrote:
> I'm currently working with a cgi script which can upload, view, or
> delete files in a given directory.  The delete section is rather
> cumbersome, in that the user has to type in the file name and password
> and then hit the delete button.
> I've created an html form in the view section that puts checkboxes
> next to each file listed.  Here's the code I have (below).  I'm
> getting an error that says that the 'post' command isn't recognized.

Where exactly are you getting this error?  The code you posted looks like
it merely creates the form html (poorly).  The error sounds like it coming
from something that processes a form submission.  But you could try
changing the "post" to a "get" in the "<form...>" element.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.


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

Date: Mon, 22 Oct 2007 18:06:46 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: generating html form on the fly
Message-Id: <471d2d06$0$491$815e3792@news.qwest.net>

ll wrote:
> I'm currently working with a cgi script which can upload, view, or
> delete files in a given directory.  The delete section is rather
> cumbersome, in that the user has to type in the file name and password
> and then hit the delete button.

You have to be very careful about this.


> I've created an html form in the view section that puts checkboxes
> next to each file listed.  Here's the code I have (below).  I'm
> getting an error that says that the 'post' command isn't recognized.

Post a short and complete example that we can run that shows the
error and where it's coming from.  This code is quite poor and
shows many problems, none of which have to do with "'post'
command isn't recognized".


> Thanks for any help,

perldoc -f qq
perldoc -q "What's the difference between calling a function as &foo and 
foo()"

perldoc CGI

Use a class to help you separate your HTML and your perl.

perldoc HTML::Template
perldoc Template::Toolkit

If neither are on your system, take a look at CPAN: http://search.cpan.org/


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

Date: Mon, 22 Oct 2007 20:19:18 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: generating html form on the fly
Message-Id: <slrnfhqj0m.mkf.tadmc@tadmc30.sbcglobal.net>

ll <barn104_1999@yahoo.com> wrote:

> I'm
> getting an error that says that the 'post' command isn't recognized.


Please do not paraphrase messages.

You should post the exact text of the message.


>    &check_url_referer;


You should not call subroutines that way unless you know what
special treatment that way enables, and you really do want
that special treatment.

It is safer to call subroutions this way instead:

   check_url_referer();


>    if (!$in{'filedirname'}) {


What if the name of the directory should happen to be "0" ?

(your program will call the error routine rather than doing the right thing)

If you want to test that $in{'filedirname'} actually contains the
name of a directory, then test that it actually contains the name
of a directory:

   if ( ! -d $in{filedirname} ) {
or
   unless ( -d $in{filedirname} ) {  # better

 
>    if (opendir(DIR,"$list_dir") == 1) {


   perldoc -q vars

       What’s wrong with always quoting "$vars"?

It is only a happy accident that today's opendir() returns one
on success.

It is specified to return true, and may change to any other true
value at any release, so you should check for truth instead:

    if ( opendir DIR, $list_dir ) {


>    print "<form method=\"post\" action=\"uploader_ee.cgi\">";


Yuck. Write is so that you can read it:

   print '<form method="post" action="uploader_ee.cgi">';
or
   print q(<form method="post" action="uploader_ee.cgi">);


>    print "<table border=\"1\">\n";

   print qq(<table border="1">\n);



>       $fitem_pathname = "$list_dir" . "/" . "$fitem";

    $fitem_pathname = "$list_dir/$fitem";


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: 23 Oct 2007 03:58:20 GMT
From: Glenn Jackman <glennj@ncf.ca>
Subject: Re: generating html form on the fly
Message-Id: <slrnfhqsat.440.glennj@smeagol.ncf.ca>

At 2007-10-22 09:19PM, "Tad McClellan" wrote:
>  ll <barn104_1999@yahoo.com> wrote:
> >    print "<form method=\"post\" action=\"uploader_ee.cgi\">";
>  
>  Yuck. Write is so that you can read it:
>  
>     print '<form method="post" action="uploader_ee.cgi">';
>  or
>     print q(<form method="post" action="uploader_ee.cgi">);

   or print "<form method='post' action='uploader_ee.cgi'>";

> >   print "<table border=\"1\">\n";
>  
>     print qq(<table border="1">\n);

   or print "<table border='1'>\n";

You can use single quotes for tag attribute values.

-- 
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry


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

Date: Mon, 22 Oct 2007 17:18:44 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: net::sftp write error with multiple packet writes
Message-Id: <471d21c5$0$3568$815e3792@news.qwest.net>

csgonan@yahoo.com wrote:
[...]
> This is the code
> 
> $ftp->binary;
> print "Uploading $_[0] to Server .......... " if (!$silent);
> $ftp->Put($_[0]) or emailerr("Error: $0 could not upload $_[0] to
> Server.");

Add the reason.  e.g. $ftp->message()

That's straight out of the documentation!

Also, I don't see a Put() method.  'put' is documented.

> print "Done\n\n" if (!$silent);
> 
> Thank you for your response.  I would say that but smaller files are
> being places there ok now that I talked to the admin at that site.  I
> saw a post that talked about changing the COPY_SIZE to something
> smaller than the default of 8192, but I don't see where to do that in
> order to check.

Again, in the documentation...

BlockSize specifies the buffer size to use for buffered data transfers.
Default is 10240.

I doubt that will have any affect.

> 
> As you can see in the output, it does the first write of 8192 and then
> fails at he remaining bytes that totals the size of the file. I have
> write access to this server too.

The actual error message should help.


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

Date: Mon, 22 Oct 2007 23:14:33 +0100
From: RedGrittyBrick <RedGrittyBrick@SpamWeary.foo>
Subject: OT Ink and Incapability. Was Re: perl standard
Message-Id: <tsKdnf-rV_1TvYDanZ2dnUVZ8v-dnZ2d@bt.com>

Wade Ward wrote:

> Who's on first?

What's on second?


> Gödel, Escher, Bach is a timeless masterpiece.

No, I think you'll find it is an eternal golden braid.


There ought to be some vaguely Perl related content in this posting:
use strict;
use warnings;
print <<EndQuote;
ActiveState is owned by its employees and Pender Financial Group, a 
publicly traded investment company focused on technology and healthcare 
sectors in British Columbia.
EndQuote

http://finance.yahoo.com/q?s=PDFFF.PK%2C+

I think you should keep Wells Fargo, but my financial advice is worth 
exactly what you paid me for it.


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

Date: Mon, 22 Oct 2007 22:10:24 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: splitting a line
Message-Id: <slrnfhq7rk.kln.tadmc@tadmc30.sbcglobal.net>

Ted Zlatanov <tzz@lifelogs.com> wrote:
> On Sun, 21 Oct 2007 00:25:21 -0700 "Wade Ward" <zaxfuuq@invalid.net> wrote: 
>
> WW> usenet is about 80 chars wide.
> WW> I don't like exceeding 65.
>
> Remember, in residential zones you can't go over 35.


and splitting a lane is OK in California, but it is still
a very bad idea.


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Thu, 22 Nov 2007 19:22:01 -0800
From: "Wade Ward" <zaxfuuq@invalid.net>
Subject: Re: splitting a line
Message-Id: <Ku6dnX1UjtAo0YDanZ2dnUVZ_gqdnZ2d@comcast.com>


"Ted Zlatanov" <tzz@lifelogs.com> wrote in message 
news:m2hckjw6ab.fsf@lifelogs.com...
> On Sun, 21 Oct 2007 00:25:21 -0700 "Wade Ward" <zaxfuuq@invalid.net> 
> wrote:
>
> WW> usenet is about 80 chars wide.
> WW> I don't like exceeding 65.
>
> Remember, in residential zones you can't go over 35.
I'm pedal to the metal whereever I go.  The only speeding ticket I've gotten 
in the last decade was on a 4-lane divided highway in Wisconsin, where on 
the radio, you had your choice between corporate country and the jesus-freak 
station.  Even though the police were pulling people over right and left, if 
you go slower, you might have to stay, because of the sheer boredom aether. 
81 in a 65: $243.

I drive 81 on the way to church.

-- 
wade ward

Westates Companies
1108 W. South Jordan pkwy
435 -838-7760
President
wade@zaxfuuq.net




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

Date: Mon, 22 Oct 2007 23:05:53 -0000
From:  Dodge <dodge1942@gmail.com>
Subject: Unix BG and Perl/TK
Message-Id: <1193094353.222308.178690@v23g2000prn.googlegroups.com>

I'm not sure if this is the right group to ask or not, but here goes.
I've got a perl/TK script that I need to start in the background.
Since I'm running on Unix, I'd typically do this with:

> myscript.pl &

In this application though, I have another program that is calling my
script. I don't have permission to modify this other program. Is there
a way that I can do the same thing in my script? I've checked the PERL
FAQs, but apparently don't know what I'm looking for. Thanks in
advance!



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

Date: 22 Oct 2007 23:30:51 GMT
From: all mail refused <elvis-85473@notatla.org.uk>
Subject: Re: Unix BG and Perl/TK
Message-Id: <slrnfhqce4.7dp.elvis-85473@notatla.org.uk>

On 2007-10-22, Dodge <dodge1942@gmail.com> wrote:

> I've got a perl/TK script that I need to start in the background.
> Since I'm running on Unix, I'd typically do this with:
>
>> myscript.pl &
>
> In this application though, I have another program that is calling my
> script. I don't have permission to modify this other program. Is there
> a way that I can do the same thing in my script? I've checked the PERL

Sounds as if you want to get familiar with fork().

-- 
Elvis Notargiacomo  master AT barefaced DOT cheek
http://www.notatla.org.uk/goen/


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

Date: Tue, 23 Oct 2007 03:14:22 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Unix BG and Perl/TK
Message-Id: <u020v4-go21.ln1@osiris.mauzo.dyndns.org>


Quoth Dodge <dodge1942@gmail.com>:
> I'm not sure if this is the right group to ask or not, but here goes.
> I've got a perl/TK script that I need to start in the background.
> Since I'm running on Unix, I'd typically do this with:
> 
> > myscript.pl &
> 
> In this application though, I have another program that is calling my
> script. I don't have permission to modify this other program. Is there
> a way that I can do the same thing in my script? I've checked the PERL
> FAQs, but apparently don't know what I'm looking for. Thanks in
> advance!

You may want to look at Proc::Daemon.

Ben



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

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V11 Issue 967
**************************************


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