[24804] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6957 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 3 21:06:08 2004

Date: Fri, 3 Sep 2004 18:05:07 -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           Fri, 3 Sep 2004     Volume: 10 Number: 6957

Today's topics:
    Re: Execute Windows program from Perl script (??) <jurgenex@hotmail.com>
    Re: Handling and recursing subdirectories <Joe.Smith@inwap.com>
    Re: How do you lock a file BEFORE changes are made? <invalid-email@rochester.rr.com>
    Re: output becomes unicode <Joe.Smith@inwap.com>
        print Location to blank window? <dingdongy2k@hotmail.com>
    Re: print Location to blank window? <nospam@bigpond.com>
    Re: print Location to blank window? <jurgenex@hotmail.com>
    Re: print Location to blank window? <sbryce@scottbryce.com>
    Re: Reading UTF-8 string from file with read() function (Sergei)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 04 Sep 2004 00:20:33 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Execute Windows program from Perl script (??)
Message-Id: <lT7_c.143$Q44.95@trnddc09>

Tony McGuire wrote:
> Ian Wilson <scobloke2@infotop.co.uk> wrote
>>
>> If I recall correctly, you want to invoke textpad to edit apache's
>> config and then get Apache to reload its config.
>>
>> I'd find it a lot easier to use perl to
>>
>> * read the config file,
>> * write a new httpd.conf.new,
>> * rename httpd.conf httpd.conf.old
>> * rename httpd.conf.new httpd.conf
>> * get Apache's process ID (hit PID file)
>> * send a 'reload your config' signal (HUP) to Apache. (perldoc -f
>> kill)
>>
>> I suspect this would be an order of magnitude simpler.
>
> Now *this* is the type of thing I was hoping for.

But it is not what you asked about. You asked explicitely
<quote>
What I want is to launch a (Windows) program from a perl script and
for the perl script to continue on. [...]
Does anyone have info on how to (whether I can) get perl to execute an
external program and continue on?
</quote>

Now, why are you surprised when people are trying to answer the question you 
actually asked rather then trying to guess what you might have been hoping 
for?

jue 




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

Date: Fri, 03 Sep 2004 20:06:07 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: Handling and recursing subdirectories
Message-Id: <P84_c.96904$9d6.59001@attbi_s54>

Kloudnyne wrote:

> If anyone else has a piece of code that will fulfil my requirements
> and make my life easier, you will have my undying gratitude...

use File::Find;
sub process { print "Found file $_ in $File::Find::dir\n" if -f $_; }
find(\&process,'/tmp');

	-Joe


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

Date: Sat, 04 Sep 2004 00:47:33 GMT
From: Bob Walton <invalid-email@rochester.rr.com>
Subject: Re: How do you lock a file BEFORE changes are made?
Message-Id: <413910A2.6060002@rochester.rr.com>

J. Romano wrote:
> tiltonj@erols.com (Jay Tilton) wrote in message news:<412fdce7.447163607@news.erols.com>...
> 
>>jl_post@hotmail.com (J. Romano) wrote:
 ...
>    I would just like to know if there is an easy way to lock a file
> before it gets truncated.  If there isn't, then apparently flock()

The least-hassle approach IMO is to simply use another file (termed the 
"lock file") to establish the lock.  That file may be empty or have 
contents which don't matter.  Then your programs can open that file, for 
write if need be, and establish the appropriate lock.  Then open and 
read or write to your real file (or do whatever it is to whatever it is 
that needs exclusive or shared access).  When you're done, close the 
real file, and then close the lock file.  That has proven to be highly 
portable between OS's, to work very reliably, and to be very simple to 
both use and understand.

 ...

>    -- Jean-Luc


-- 
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl


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

Date: Fri, 03 Sep 2004 19:55:51 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: output becomes unicode
Message-Id: <b%3_c.28922$_g7.24655@attbi_s52>

Leif Wessman wrote:

> I've tried that. It's not the display devise...

Are you sure about that?  I've found that an xterm window often
gives different results than gnome-terminal or the KDE terminal.

Does your program act any different if you add this line at the top:
   $ENV{LANG} = $1 if $ENV{LANG} =~ /(.*)\.UTF-8/;

	-Joe


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

Date: Fri, 03 Sep 2004 23:10:42 GMT
From: "Travis" <dingdongy2k@hotmail.com>
Subject: print Location to blank window?
Message-Id: <SR6_c.4953$Vl5.1081@newsread2.news.atl.earthlink.net>

I am using

print "location: http://www.yahoo.com\n\n";

Is there a way to get it to print to a blank page.
such as target="_blank"

I have a toplist and someone is opening my link in a 1 x 1 pixel img src.

I want it to pop up as a new window.

Any ideas on how to do it?

Thanks

T




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

Date: Sat, 04 Sep 2004 09:55:40 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: print Location to blank window?
Message-Id: <2pseisFp1lk3U1@uni-berlin.de>

Travis wrote:

> I am using
> 
> print "location: http://www.yahoo.com\n\n";
> 
> Is there a way to get it to print to a blank page.
> such as target="_blank"
> 
> I have a toplist and someone is opening my link in a 1 x 1 pixel img src.
> 
> I want it to pop up as a new window.
> 
> Any ideas on how to do it?
> 
> Thanks
> 
> T

Your question is gibberish.

gtoomey


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

Date: Sat, 04 Sep 2004 00:26:44 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: print Location to blank window?
Message-Id: <8Z7_c.168$Q44.50@trnddc09>

Travis wrote:
> I am using
>
> print "location: http://www.yahoo.com\n\n";
>
> Is there a way to get it to print to a blank page.

Perl does not have pages, much less blank pages.

> such as target="_blank"

Did you mean
    $target="_blank";

> I have a toplist and someone is opening my link in a 1 x 1 pixel img
> src.

Perl has lists, but what is a toplist?

> I want it to pop up as a new window.

What are you using as your GUI? Perl::Tk?

> Any ideas on how to do it?

Did you check the documentation of your GUI API?

jue 




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

Date: Fri, 03 Sep 2004 19:01:10 -0600
From: Scott Bryce <sbryce@scottbryce.com>
Subject: Re: print Location to blank window?
Message-Id: <10ji4u6svqr2vb0@corp.supernews.com>

Travis wrote:
> I am using
> 
> print "location: http://www.yahoo.com\n\n";
> 
> Is there a way to get it to print to a blank page.
> such as target="_blank"

target="_blank" isn't Perl. It is HTML. Ask in an HTML newsgroup.

> I want it to pop up as a new window.

That is controlled on the client side.



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

Date: 3 Sep 2004 14:00:07 -0700
From: sergeisn-tma@yahoo.com (Sergei)
Subject: Re: Reading UTF-8 string from file with read() function.
Message-Id: <1ce4f694.0409031300.7d48f9fa@posting.google.com>

nobull@mail.com wrote in message news:<4dafc536.0409010947.2fe876a7@posting.google.com>...
> sergeisn-tma@yahoo.com (Sergei) wrote in message news:<1ce4f694.0408311918.29765621@posting.google.com>...
> > Brian McCauley <nobull@mail.com> wrote in message 
> Yes, you can use Encode::decode_utf8() instead of the builtin
> utf8::decode() if you like.  Note: when called with a single agument
> Encode::decode_utf8() is simply a wrapper for utf8::decode().

I didn't know I could use it like this.
This way it's even better.
Thanks!
(Other's messages were useful too. What an excellent thing this news
group! Thanks a lot everybody!)


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

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


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