[26929] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 8900 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 30 03:05:27 2006

Date: Mon, 30 Jan 2006 00:05:05 -0800 (PST)
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, 30 Jan 2006     Volume: 10 Number: 8900

Today's topics:
    Re: capturing [A-Z]+ in binary file - how? - EMASTER_Z  <joe@inwap.com>
    Re: Embedding private .pm files into a script <notvalid@email.com>
        How set timeout to connect operate <luoyong_zh@hotmail.com>
    Re: How set timeout to connect operate <1usa@llenroc.ude.invalid>
    Re: perl menubased user interface <dmehler26@woh.rr.com>
    Re: perl menubased user interface <1usa@llenroc.ude.invalid>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 29 Jan 2006 19:21:42 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: capturing [A-Z]+ in binary file - how? - EMASTER_Z (0/1)
Message-Id: <UISdnYiYOaLMG0DeRVn-qQ@comcast.com>

Steve D wrote:
> print STDOUT <MASTER_IN>;
> 
> @master_array = <MASTER_IN>;   
> 
> ## what am I doing wrong, or do not understand"

The thing that you do not understand is that <> in list context
will read in the _entire_ file all at once, and print() supplies
list context.

   print STDOUT <MASTER_IN>;    # Read and write entire file
   @master_array = <MASTER_IN>; # Reads nothing, file at EOF already

Binary files may or may not have any linefeeds, therefore you should
read in fixed-length records.

   my $record_size = 8192;
   open my $in,'<',$file_name or die "Cannot read $file_name: $!\n";
   $/ = \$record_size;
   while (<$in>) { 'do something with $_'; }

	-Joe


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

Date: Mon, 30 Jan 2006 07:38:05 GMT
From: Ala Qumsieh <notvalid@email.com>
Subject: Re: Embedding private .pm files into a script
Message-Id: <xnjDf.32846$PL5.14223@newssvr11.news.prodigy.com>

Haakon Riiser wrote:
> [A. Sinan Unur]
> 
> 
>>See
>>
>>perldoc -q lib
>>perldoc lib
>>perldoc FindBin
>>
>>NAME
>>    FindBin - Locate directory of original perl script
>>
>>SYNOPSIS
>>     use FindBin;
>>     use lib "$FindBin::Bin/../lib";
>>
>>     or
>>
>>     use FindBin qw($Bin);
>>     use lib "$Bin/../lib";
>>
>>So, put your scripts in a directory, and put your packages in a 
>>subdirectory of that. Then zip everything up. Give them the zip file.
> 
> 
> Thanks for the tip, but I'd prefer not having to reorganize my
> directories.

What's wrong with a simple:

	use lib '/path/to/your/module/dir';

?

--Ala



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

Date: Mon, 30 Jan 2006 12:20:57 +0800
From: yong <luoyong_zh@hotmail.com>
Subject: How set timeout to connect operate
Message-Id: <drk464$l86$1@news.yaako.com>

I want to stop a connect operate and I don't want to use 
IO::Socket::INET.So I put the connect function into a thread,but there 
seems no way to force a thread stop.

Is there some way to stop a socket connect operate?

Thanks.


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

Date: Mon, 30 Jan 2006 05:24:50 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: How set timeout to connect operate
Message-Id: <Xns975B44A38020asu1cornelledu@127.0.0.1>

yong <luoyong_zh@hotmail.com> wrote in news:drk464$l86$1@news.yaako.com:

> I want to stop a connect operate and I don't want to use 
> IO::Socket::INET.So I put the connect function into a thread,but there 
> seems no way to force a thread stop.
> 
> Is there some way to stop a socket connect operate?

I am having a hard time making sense of your question. Please consult the 
posting guidelines for this group.

Please post a short but complete script that others can run to see what 
you are talking about.

Sinan

-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



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

Date: Mon, 30 Jan 2006 05:49:48 GMT
From: "Dave" <dmehler26@woh.rr.com>
Subject: Re: perl menubased user interface
Message-Id: <0OhDf.52638$tK4.15869@tornado.ohiordc.rr.com>

Hi,
    Thanks for your reply. Webmin i think is overkill for what i want to do, 
i only need a few functions. And as for access control that's why i use sudo 
so i can see who does what. And the user who will have this program is 
trusted not to go beyound the menu setup for the simple reason is he does 
not have the knowledge.
Thanks.
Dave.

"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message 
news:Xns975A69492B58Aasu1cornelledu@127.0.0.1...
> "Dave" <dmehler26@woh.rr.com> wrote in
> news:MF4Df.52493$tK4.376@tornado.ohiordc.rr.com:
>
>
>> I  want to design a perlbased user interface that i can drop
>> in as a shell for one or more users.
>
> ...
>
>> If this works i might also want to transfer this in to a web
>> environment,
>
> See http://www.webmin.com/
>
>> where the user wouldn't have to log in
>
> Allowing people to muck around with your system without authentication and
> authorization procedures does not sound like a good idea to me.
>
> Sinan
> -- 
> A. Sinan Unur <1usa@llenroc.ude.invalid>
> (reverse each component and remove .invalid for email address)
>
> comp.lang.perl.misc guidelines on the WWW:
> http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
> 




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

Date: Mon, 30 Jan 2006 06:22:56 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: perl menubased user interface
Message-Id: <Xns975BE23AE2EDasu1cornelledu@127.0.0.1>

[ Please do not top-post -- Please do not full quote ] 

"Dave" <dmehler26@woh.rr.com> wrote in
news:0OhDf.52638$tK4.15869@tornado.ohiordc.rr.com: 

> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message 
> news:Xns975A69492B58Aasu1cornelledu@127.0.0.1...
>> "Dave" <dmehler26@woh.rr.com> wrote in
>> news:MF4Df.52493$tK4.376@tornado.ohiordc.rr.com:
>>
>>
>>> I  want to design a perlbased user interface that i can drop
>>> in as a shell for one or more users.
>>
>> ...
>>
>>> If this works i might also want to transfer this in to a web
>>> environment,
 ...

>> Allowing people to muck around with your system without
>> authentication and authorization procedures does not sound like a
>> good idea to me. 

> And as for access control  ... the user who will have this
> program is trusted not to go beyound the menu setup for the simple
> reason is he does not have the knowledge.

That's great. But once you put stuff on the web, interesting things can 
happen.

Sinan

-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



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

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 8900
***************************************


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