[17956] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 116 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 22 09:05:28 2001

Date: Mon, 22 Jan 2001 06:05:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <980172310-v10-i116@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 22 Jan 2001     Volume: 10 Number: 116

Today's topics:
        Directory search without repeating (Ross Clement)
    Re: Directory search without repeating (Martien Verbruggen)
    Re: Directory search without repeating (Anno Siegel)
    Re: Expect module and SSH RGiersig@cpan.org
    Re: FAQ 9.15:   How do I decode a CGI form? (Nick Condon)
    Re: FAQ 9.15:   How do I decode a CGI form? (Nick Condon)
        Getting past protected directories? (zawy)
    Re: help with this please (Tad McClellan)
    Re: help with this please (Tad McClellan)
    Re: help with this please (Garry Williams)
        HTTP REQUEST <ag@my.web>
    Re: HTTP REQUEST <zarathustra@enviroweb.org>
    Re: HTTP REQUEST nobull@mail.com
    Re: immortal program : catching signals (Anno Siegel)
        Mcount v2.1- error <whitehead@ntlworld.com>
        Newbie Perl Problem badass101@my-deja.com
    Re: Newbie Perl Problem (Bernard El-Hagin)
    Re: percentages, how? (Peter J. Acklam)
        Perl IPC: Unix domain sockets problem <karlm@mit.edu>
        PerlIPC question jfn@dassic.com
        perlxs: How do I map C char[]? <j.m.f.@gmx.net>
    Re: Posting email from PERL to Outlook (Exchange)??? (Dan)
    Re: Posting Guidelines (was Re: Perl - Bytecode, Compil <gracenews@optusnet.com.au>
    Re: Question re: Mail::Internet (Anno Siegel)
    Re: Quick Newbie Qeustion please... (Garry Williams)
    Re: X-FILES problem (Honza Pazdziora)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 22 Jan 2001 13:01:51 GMT
From: clemenr@westminster.ac.uk (Ross Clement)
Subject: Directory search without repeating
Message-Id: <3a6c2f3f@ant.wmin.ac.uk>

Hi. What's the best way to recursively search directories without a risk of
looping if directories are linked into their own subdirectories. My limited
knowledge is limited to either using `ls -id` or (&stat( $filename)) to get
the i-number, then not expanding directories if a directory of that
inumber has been expanded before.

Any better approaches? If I was doing this in Java, I'd use the File() 
class to find the absolute path for a file, and keep a record of these.

Cheers,

Ross-c


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

Date: Tue, 23 Jan 2001 00:38:52 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Directory search without repeating
Message-Id: <slrn96odvc.bgr.mgjv@martien.heliotrope.home>

On 22 Jan 2001 13:01:51 GMT,
	Ross Clement <clemenr@westminster.ac.uk> wrote:
> Hi. What's the best way to recursively search directories without a risk of
> looping if directories are linked into their own subdirectories. My limited
> knowledge is limited to either using `ls -id` or (&stat( $filename)) to get
> the i-number, then not expanding directories if a directory of that
> inumber has been expanded before.
> 
> Any better approaches? If I was doing this in Java, I'd use the File() 
> class to find the absolute path for a file, and keep a record of these.

$ man File::Find
[snip]
       `follow'
          Causes symbolic links to be followed. Since directory
          trees with symbolic links (followed) may contain files
          more than once and may even have cycles, a hash has to
          be built up with an entry for each file.  This might be
          expensive both in space and time for a large directory
          tree. See follow_fast and follow_skip below.  If either
          follow or follow_fast is in effect:

          ·     It is guarantueed that an lstat has been called
                before the user's wanted() function is called.
                This enables fast file checks involving  _.

          ·     There is a variable `$File::Find::fullname' which
                holds the absolute pathname of the file with all
                symbolic links resolved
[snip]

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Useful Statistic: 75% of the people
Commercial Dynamics Pty. Ltd.   | make up 3/4 of the population.
NSW, Australia                  | 


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

Date: 22 Jan 2001 13:41:00 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Directory search without repeating
Message-Id: <94hd9c$nfl$1@mamenchi.zrz.TU-Berlin.DE>

Ross Clement <clemenr@westminster.ac.uk> wrote in comp.lang.perl.misc:
>Hi. What's the best way to recursively search directories without a risk of
>looping if directories are linked into their own subdirectories. My limited
>knowledge is limited to either using `ls -id` or (&stat( $filename)) to get
>the i-number, then not expanding directories if a directory of that
>inumber has been expanded before.

That approach is fine, except you need to remember the device along with
the inode if symlinks are a possibility.

>Any better approaches? If I was doing this in Java, I'd use the File() 
>class to find the absolute path for a file, and keep a record of these.

What is "the" absolute path to a file?  The existence of hard links
under Unix means there can be more than one, which is exactly the
problem.  I don't see how an absolute path name would solve it.

Anno


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

Date: Mon, 22 Jan 2001 11:46:41 GMT
From: RGiersig@cpan.org
Subject: Re: Expect module and SSH
Message-Id: <94h6j0$a76$1@nnrp1.deja.com>

In article <3A68F4EA.1480842D@gurunet.com>,
  Nathan Fain <nathanf@gurunet.com> wrote:
> I'm trying to create a script to act as a shell to ssh allowing me to
> open multiple ssh sessions with one input from the user.  That is,
> taking a
> command(s) from the user and executing it on 3 different machines.

>  Below is the code I'm using.  I believe the problem has to do
> with opening multiple objects using the Expect module.

Looks good so far (though it is unnecessary complicated through
the use of array indices; just iterate over the server names and
push the expect objects onto the @connect array).

Set $Expect::Internals=1; this will produce detailed
output of what expect is doing, what it is receiving and what
it thinks is matching and so on.

I don't see anything offhand that looks like a mistake, so it might
be some subtlety regarding what gets matched and what not.

You might want to take a look into the Expect_FAQ.pod that comes
with the distribution for a login example using callbacks
that is, well, more elegant.

Hope this helps,

Roland
--
RGiersig@cpan.org


Sent via Deja.com
http://www.deja.com/


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

Date: 22 Jan 2001 12:28:46 GMT
From: nickco3@yahoo.co.uk (Nick Condon)
Subject: Re: FAQ 9.15:   How do I decode a CGI form?
Message-Id: <903175CF6NickCondon@132.146.16.23>

joehecht@code4sale.com (Joe C. Hecht) wrote
>That being said,
>the fact that I took enough time and effort to
>render an opinion is good enough, and it is up
>to you to judge if the opinion may have or may
>not have merrit.
>
>Joe

Thank you, I will.

*ploink*

Consider your opinion judged.


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

Date: 22 Jan 2001 12:36:43 GMT
From: nickco3@yahoo.co.uk (Nick Condon)
Subject: Re: FAQ 9.15:   How do I decode a CGI form?
Message-Id: <90317BEABNickCondon@132.146.16.23>

joehecht@code4sale.com (Joe C. Hecht) wrote in
<oQna6.1958$db6.224305@paloalto-snr1.gtei.net>: 

>> So you'd both rather keep your own unreviewed bugs, than have a whole
>> team of specialist volunteers world-wide working on submitting fixes
>> to the author, without any particular effort on your part?  Strange.
>
>volunteer specialists??? Where?

Ever heard of open-source code? Linux? Apache? Sendmail? BIND? Perl? CPAN?
Every one of them built by volunteer specialists.


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

Date: Mon, 22 Jan 2001 13:30:40 GMT
From: zawy@yahoo.com (zawy)
Subject: Getting past protected directories?
Message-Id: <3a6c3421.5251069@news.knology.net>


How do I use Perl to enter my username and password on a Unix protected directory (over ther internet)?  LWP::Authen::Basic somewhere?


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

Date: Mon, 22 Jan 2001 13:07:55 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: help with this please
Message-Id: <slrn96o4mu.iev.tadmc@tadmc26.august.net>

Donald Dahlman <druid@nift.net> wrote:
>$character_name= "$cgi_data{'password'}";
>
>print "$cgi_data{'password'}\n";
>
>the first line faults
>the second line works ok, can someone tell me
>what I am doing wrong.


Not if you don't elaborate on what "faults" means.

If perl issues messages, then show the verbatim message text
(after looking up the message in perldiag.pod)

Messages are meant to help in debugging. If you want help in
debugging, you should supply the text of the messages in order
to help the helper help you.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Mon, 22 Jan 2001 13:07:56 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: help with this please
Message-Id: <slrn96o4tk.iev.tadmc@tadmc26.august.net>

David Efflandt <efflandt@xnet.com> wrote:

>You don't say where you get %cgi_data from.  Maybe you made a typo or 
>$cgi_data{'password'} contains a list instead of a scalar.  


That is not possible in Perl.

*All* hash values are scalars. A hash value cannot contain a "list",
or even an "array". I could contain a reference (scalar) to an
array though. It cannot contain a reference to a list either.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Mon, 22 Jan 2001 14:02:47 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: help with this please
Message-Id: <b4Xa6.5658$tg4.28857@eagle.america.net>

On Sun, 21 Jan 2001 21:50:00 -0800, Donald Dahlman <druid@nift.net> wrote:
>$character_name= "$cgi_data{'password'}";
>
>print "$cgi_data{'password'}\n";
>
>the first line faults

Huh?  

>the second line works ok, 

Huh?

>can someone tell me
>what I am doing wrong.

Since I have to guess, I bet it's not enabling warnings and
strictures.  

Did I get it?  

-- 
Garry Williams


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

Date: Mon, 22 Jan 2001 12:12:57 +0100
From: "AG" <ag@my.web>
Subject: HTTP REQUEST
Message-Id: <94h4h7$20gg$1@stargate1.inet.it>

Hi,
I need to do an HTTP request to get a file from a server with user&password
autentication...How can I do it????
Please...HELP ME....

reply to giraldiaFUCKDASPAM@tin.it

Thanks a lot, GUYS!!!





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

Date: Mon, 22 Jan 2001 13:08:20 GMT
From: "Vogelfrei" <zarathustra@enviroweb.org>
Subject: Re: HTTP REQUEST
Message-Id: <8hWa6.4971$165.363023@newsread2.prod.itd.earthlink.net>


"AG" <ag@my.web> wrote in message news:94h4h7$20gg$1@stargate1.inet.it...
> Hi,
> I need to do an HTTP request to get a file from a server with
user&password
> autentication...How can I do it????

The "Access to Protected Documents" section in the libwww cookbook might be
a start.




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

Date: 22 Jan 2001 13:05:12 +0000
From: nobull@mail.com
To: giraldia@tin.it
Subject: Re: HTTP REQUEST
Message-Id: <u91ytvenzr.fsf@wcl-l.bham.ac.uk>

"AG" <ag@my.web> spams:

> I need to do an HTTP request to get a file from a server with user&password
> autentication...How can I do it????

Please do not spam.  Not ever, not even a little bit.  Post your
question once.  Crosspost iff appropriate.  Never post the same
question separately to two or more related newsgroups.

> Please...HELP ME....
> 
> reply to giraldiaFUCKDASPAM@tin.it

I tried that when I answered your question in comp.lang.perl.modules.
It bounced.  If you want mailed replies but don't want to expose your
main address to havesters then make the effort to get an throw-away
address and put it in the Mail-copies-to header.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 22 Jan 2001 11:38:39 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: immortal program : catching signals
Message-Id: <94h63v$f6i$1@mamenchi.zrz.TU-Berlin.DE>

 <vivek@cse.iitd.ernet.in> wrote in comp.lang.perl.misc:
>hi all,
>
>i wanna write a perl script which will run on X (linux) with root
>owner....i want that a user should not be able to kill the script.....i
>tried using %SIG for the same...but crossing out the window kills the
>signal....i want to catch and ignore all the possible kill signals
>(ofcourse barring a few like -9)....using %SIG for the same didn't
>solved the purpose.....

If you want your program to be immune to a window close, don't
run it from a window.  See perldoc -q daemon on how to detatch
a process.

>Please suggest me a solution to trap all the signals and how to write an
>immortal program.............

Trapping all signals is easy:

for ( keys %SIG ) {
  next if $_ eq '__WARN__';
  next if $_ eq '__DIE__';
  $SIG{ $_} = \ &handler;
}

Whether such an indiscriminate method is advisable is anotehr question.

Anno


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

Date: Mon, 22 Jan 2001 12:52:12 -0000
From: "whitehead" <whitehead@ntlworld.com>
Subject: Mcount v2.1- error
Message-Id: <e3Wa6.9312$4k4.231683@news2-win.server.ntlworld.com>

Hi all!

I have tried over and over again to solve my problem and had no look. I hope
someone out there (anywhere) can help.

When I execute my script on the server, it gives me the following error:
'[Error : creating file]'

The script is located at:

/cgi-bin/mcount/mcount.cgi

My HTML name is: mcount.shtml (my server requires that I name the html to
shtml).

The call tag is:

<!--#exec cgi="/cgi-bin/mcount/mcount.cgi" --> .

Here are some more useful settings:

$data_dir = '/cgi-bin/mcount/data/'; #The 'data' folder has been CHMOD

$format = 'OVERALL';

#All other details have been left to default. I have also tried setting
$locking = 0 #This does not work either.

Thanks for all the help you can give. Should you need more information,
please e-mail me.

Thank You in advanced.

WiZdm- UK





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

Date: Mon, 22 Jan 2001 11:17:33 GMT
From: badass101@my-deja.com
Subject: Newbie Perl Problem
Message-Id: <94h4s9$96l$1@nnrp1.deja.com>

Hi,

I have a variable, $text1, which is full of text.
I want to strip the whitespace and new lines out of the file so that i
get a list of words, seperated by a space,

e.g.
word1 word2 word3

How can i do this easily??

Thanks,

Craig


Sent via Deja.com
http://www.deja.com/


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

Date: Mon, 22 Jan 2001 11:42:34 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: Newbie Perl Problem
Message-Id: <slrn96o757.2q0.bernard.el-hagin@gdndev25.lido-tech>

On Mon, 22 Jan 2001 11:17:33 GMT, badass101@my-deja.com
<badass101@my-deja.com> wrote:
>Hi,
>
>I have a variable, $text1, which is full of text.
>I want to strip the whitespace and new lines out of the file so that i
>get a list of words, seperated by a space,
>
>e.g.
>word1 word2 word3
>
>How can i do this easily??

First, read this:

perldoc -f split

After you're done with that you can use your new knowledge to try to
come up with a solution. If you can't, post your attempt and we'll
gladly help you fix it.

Cheers,
Bernard
--
#requires 5.6.0
perl -le'* = =[[`JAPH`]=>[q[Just another Perl hacker,]]];print @ { @ = [$ ?] }'


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

Date: 22 Jan 2001 14:44:00 +0100
From: jacklam@math.uio.no (Peter J. Acklam)
Subject: Re: percentages, how?
Message-Id: <wk66j7g5p5.fsf@math.uio.no>

"Michael Schlueter" <Michael.Schlueter@philips.com> writes:

> Looks like this is a good question for an enjoyable contest.

The basic problem here is to generate random variables from a
discrete non-uniform distribution.

This problem can be solved in linear time.  One algorithm for
doing this is the "method of guide tables".  A reference is

    Devroye, Luc (1986), Non-uniform Random Variate Generation,
    Springer-Verlag, New York.

Peter

-- 
$\="\n";$_='The quick brown fox jumps over the lazy dog';print +(split
//)[20,5,24,31,3,36,14,12,31,1,2,11,9,23,33,29,35,15,32,36,7,8,28,29];


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

Date: Mon, 22 Jan 2001 08:12:48 -0500
From: Nobody <karlm@mit.edu>
Subject: Perl IPC: Unix domain sockets problem
Message-Id: <3A6C31D0.6012A2D8@mit.edu>

I am trying to write a perl text processing server to be called from a C
program.
(I prefer this to embedding perl in C because it increases code
reusability.)
I decided to make a mockup client in perl that will later be replaced by
a client written in C.
The server is never getting past the initial read from the socket.
I'm running this on RedHat Linux 6.2.

The client is executing the print STDOUT in:

$EOL = "\n";
print SOCK "$msg$EOL";
print STDOUT "send: $msg\n";

but the server never executes the print STDOUT in:

$input = <Client>;
print STDOUT "Server read: $input\n";


-----------Here's the sample output:

[prompt]# client.pl

Forked: 13840
Socket created: /tmp/karlm_socket
Server socket bound
SOMAXCONN:128
Server Listening
Connection accepted
Server about to read
hello
send: hello



----------It hangs there indefinately.
----------Here's the client code;
#! /usr/bin/perl -w
#client.pl
#This is just test code.

use strict;
use Socket;
use Carp;

my $EOL = "\n";
#my $EOL = "\015\012"; #Shouln't need a special terminator, but it
doesn't hurt.

my ($input, $output, $msg);
my $child_pid = 0;

if ($child_pid = fork){
    print STDOUT "\nForked: $child_pid\n";
}
else{
    exec 'server.pl';
}

sleep 10; #allow server some setup time.  More robust solution later.

my $TEMP_FILE = '/tmp/karlm_socket';

socket(SOCK, PF_UNIX, SOCK_STREAM, 0)  || die "Socket: $!";
connect(SOCK, sockaddr_un($TEMP_FILE)) || die "connect: $!";

while (1){
    $input = <>;
    $msg ="$input$EOL";
    print SOCK "$msg$EOL";
    print STDOUT "send: $msg\n";
    $output = <SOCK>;
    print STDOUT "recieve: $output";
}

exit "Empty input: $input";

----------Here's the server:
#! /usr/bin/perl -w
#server.pl
#text processing not done yet.

use strict;
use Socket;
use Carp;

my $EOL = "\015\012";  #We shouldn't need a special terminator, but here
it is.
my $TEMP_FILE = '/tmp/karlm_socket';
my $uaddr = sockaddr_un($TEMP_FILE);

my $proto = getprotobyname('tcp');
my $input = "";
my $name = "none";
my $msg = "";

#first set up a socket

socket(Server, PF_UNIX, SOCK_STREAM, 0)  || die "socket failed: $!";
unlink($TEMP_FILE);
print STDOUT "Socket created: $TEMP_FILE\n";
bind(Server, $uaddr)                     || die "bind failed: $!";
print STDOUT "Server socket bound\nSOMAXCONN:";
print STDOUT SOMAXCONN,"\n";
listen(Server, SOMAXCONN)                || die "list failed: $!";

print STDOUT "Server Listening\n";
accept(Client, Server) || die "accept failed: $!";
print STDOUT "Connection accepted\n";

#Client and server take turns.
#The looping condition will be changed when the thing actually works.
while (1){
    print STDOUT "Server about to read\n";  #this gets executed.
    $input = <Client>;  #This is where we hang.
    print STDOUT "Server read: $input\n"; #never reached.
#
#  Process the text here.
#
#
#
    print Client "$input$EOL";
}

exit "Closed Socket: $TEMP_FILE";








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

Date: Mon, 22 Jan 2001 11:16:15 GMT
From: jfn@dassic.com
Subject: PerlIPC question
Message-Id: <94h4pr$8v6$1@nnrp1.deja.com>

Hi!

I'm using the tcp client/server examples in the perlipc description, the
server I use is the multithreaded (forked).

I've run into two problems, well 3 actually.

One is how to set a upper limit regarding how many children the serer is
allowed to spawn. There are examples of this with some of the other
scripts using OO style setup, but no examples on how to do it when not
using OO style.

Next thing is how to access/get the IP & DNS name ofthe connecting
client from the spawned sub.
Outside the sub this is setup, but inside the spawned sub I can't access
these values.

Last thing. How to autoflush when not using OO style setup.



l8r/Jspr


Sent via Deja.com
http://www.deja.com/


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

Date: 22 Jan 2001 13:41:29 +0100
From: Jens M. Felderhoff <j.m.f.@gmx.net>
Subject: perlxs: How do I map C char[]?
Message-Id: <pbae8jahdx.fsf@srv-deu-cos11.baan.com>

I have some C sources that define character arrays, like

	typedef char	firstname[FIRSTNAMELEN];

When I define firstname as T_PTRREF in the typemap, the resulting code
produces the (wrong) C statement:

	arg0 = (firstname) tmp;

and the C compiler thus correctly complains:

	cast specifies array type

because arg0 is a character array, not a pointer.

What's the proper way to handle character arrays from within XSUBS?

Cheers

Jens


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

Date: Mon, 22 Jan 2001 08:29:32 -0500
From: "Daniel (Dan) Rosenzweig" <danr@att.com>
Subject: Re: Posting email from PERL to Outlook (Exchange)???
Message-Id: <3A6C35BB.63456BEA@att.com>

Having never done OLE programming before - where can I find documentation to
the objects /commands available to me when talking to Outlook?   The
activeperl site give some simple examples - and I can't find much of
anything in http://www.microsoft.com/com

Thanks.

Rob wrote:

> This is as far as I can get with this.  The CDO code to get an Inbox
> count is this:
>
>



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

Date: Mon, 22 Jan 2001 22:13:32 +1000
From: "Jeffrey Grace" <gracenews@optusnet.com.au>
Subject: Re: Posting Guidelines (was Re: Perl - Bytecode, Compile to C, Perl2EXE)
Message-Id: <3a6c23f7$0$15496$7f31c96c@news01.syd.optusnet.com.au>

"brian d foy" <comdog@panix.com> wrote in message
news:comdog-8C8444.00064122012001@news.panix.com...
>
> > Thats a syntax error?? I cut and pasted it (just checked it then to be
sure)
> > from a working, error free CGI script.
>
> sounds like you might be working on Windows.  see previous discussions
> on how Window's strange notion of filenames causes this problem.

yeah I was. (win95), while it didn't cause an error, it wasn't actually
working as it should. When I changed the case to use strict; it immediately
gave a couple of warnings. (To do with some custom packages)

> that's why www.perldoc.com exists.  don't complain about not having
> time - you aren't special in that regard.

Wasn't actually complaining, and wasn't talking about myself either. Though
some people seem to assume that you've read the entire FAQ, when you might
have missed something through searches, because Perl uses a slightly
different terminology then you are used to, or you just didn't think of
using a particular search term, though yes www.perldoc.com does help
somewhat with this, hence the suggestion to mention it in the rules.

> brian d foy <comdog@panix.com>

--
Jeffrey Grace
~~~~~~~~~~~~~~~~~~~~
Queensland, Australia





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

Date: 22 Jan 2001 12:00:35 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Question re: Mail::Internet
Message-Id: <94h7d3$f6i$2@mamenchi.zrz.TU-Berlin.DE>

Ranyart Olias <ranyartolias@hotmail.com> wrote in comp.lang.perl.misc:
>I am trying to stuff the value of a message body into an array.
>Mail::Internet allows me to write to a file handle:
>
>use Mail::Internet;
>open SPAM, "/home/user/message.txt";
>$spam = Mail::Internet->new( *SPAM );
>close SPAM;
>
>open BODY, ">/home/tag-net/body.txt";
>$spam->print_body(\*BODY);
>
>
>What I would like to do, however, is just
>stuff contents of the message body into an
>array, without opening any files.

You could tie a filehandle to the array to make Mail::Internet think
it reads from a file.  Alternatively, there are other mail modules
that accept messages in different ways.

Anno


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

Date: Mon, 22 Jan 2001 13:54:32 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: Quick Newbie Qeustion please...
Message-Id: <sYWa6.5657$tg4.28857@eagle.america.net>

On Sun, 21 Jan 2001 09:00:27 +0200, Ofir <ofirb@jdc.org.il> wrote:
>I want to be able to determine how many lines are in a file.
>What is the way (subroutine) to check the total number of lines written in a
>file?

sub lines {
  my $file = shift;
  return qx/grep -c '\$' $file/;
}

-- 
Garry Williams


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

Date: Sun, 21 Jan 2001 13:14:28 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: X-FILES problem
Message-Id: <G7IKs4.9B3@news.muni.cz>

On Sun, 21 Jan 2001 12:56:35 +0000 (UTC), MaxyM <marekpow@email.hinet.hr> wrote:
> 
> 1.) On my web page code is:
> <input type="text" name="nas"..etc..>
> 
> And it's all ok if someone writes only name, or anything else that is one
> word.
> But if you write John Janson for example, then in Perl I get
> 
> John+Janson ??

No, you don't. If you use CGI.pm module to do all the processing work
for you, you'll never see those pluses.

Yours,

-- 
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
   .project: Perl, DBI, Oracle, MySQL, auth. WWW servers, MTB, Spain.
Petition for a Software Patent Free Europe http://petition.eurolinux.org
------------------------------------------------------------------------


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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


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