[7089] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 714 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 9 13:34:16 1997

Date: Wed, 9 Jul 97 10:00:23 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 9 Jul 1997     Volume: 8 Number: 714

Today's topics:
     [Fwd: Using link to copy a file] <George.Mansoor@CSUN.Edu>
     Re: Best idiom for defaulting, getting & untainting an  (dave)
     Re: Can an array have two subscripts (i.e., @array (i,j <mattrope@mdhost.cse.tek.com>
     Re: double cast? <rootbeer@teleport.com>
     FTP and Perl <froboz@roundtable.cif.rochester.edu>
     Re: how to s '?' ? (Gerben Vos)
     Re: HTTP SOCKET SUPPORT <mwf1@engr.uark.edu>
     Re: I just dont't get this -- opening a new filehandle (Nathan V. Patwardhan)
     Re: mkdir w/ perl & chmod blah blah (Honza Pazdziora)
     multiplatform perl... (Jon A. Tankersley)
     Re: pattern matching problem (Tad McClellan)
     Re: pattern matching problem (Jean-Damien Durand)
     Re: pattern matching problem <dboorstein@ixl.com>
     Re: Perl & MsAccess <dada@divinf.it>
     Perl and Sockets <gssherma@schmelze.corp.hp.com>
     Re: perl CGI on NT- can't read CGI.pm (M.J.T. Guy)
     Re: Q: Mail::Send (Nathan V. Patwardhan)
     Re: Sending file back to directory? <rootbeer@teleport.com>
     Simple.pm <dantin@icp.grenet.fr>
     Re: SSI's in CGI output <bryan@eai.com>
     Re: TOP 5 REASONS FOR SWITCHING TO PERL (dave)
     Re: TOP 5 REASONS FOR SWITCHING TO PERL (Anton Dischner)
     Re: URL counter? (Abigail)
     Re: Win32 & FTP (Neil Kohl)
     X.25 communications via perl? <sr@pc-plus.de>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 09 Jul 1997 08:39:20 -0700
From: George Mansoor <George.Mansoor@CSUN.Edu>
Subject: [Fwd: Using link to copy a file]
Message-Id: <33C3B0A8.CC5362F9@CSUN.Edu>

This is a multi-part message in MIME format.
--------------BF62542BE4EEABECCC65EF80
Content-Type: text/plain; charset=us-ascii
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit



--------------BF62542BE4EEABECCC65EF80
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Message-ID: <33C143D3.3FEBCB41@CSUN.Edu>
Date: Mon, 07 Jul 1997 12:30:27 -0700
From: George Mansoor <George.Mansoor@CSUN.Edu>
Organization: Systems & Technology - Cal State Northridge
X-Mailer: Mozilla 4.01 [en] (WinNT; I)
MIME-Version: 1.0
Newsgroups: comp.lang.perl.misc
Subject: Using link to copy a file
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I'm trying to use link to copy a file.  It doesn't seem to work when I
try to copy a file to a different directory.  Does anyone know why
and/or how I should copy files in perl?

Thanks

george


--------------BF62542BE4EEABECCC65EF80--



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

Date: Wed, 09 Jul 1997 03:57:33 GMT
From: over@the.net (dave)
Subject: Re: Best idiom for defaulting, getting & untainting an env variable.
Message-Id: <33c309d6.23660261@news.one.net>

over@the.net (dave) wrote:

>
>Right now I'm doing:
>
>$inval = "defaultval" unless $inval = $ENV{INVAL};
>$inval = $1 if $inval =~ /^(expression)$/;    # untaint
>

Now reduced to this which doesn't complain using -w:

($inval = $ENV{INVAL} ||= "default") =~ /^(exp)$/ and $inval = $1;


C'mon folks, it MUST be possible to have only one reference to $inval.


Thanks,
Dave

|
| Please visit me at http://w3.one.net/~dlripber
|
| For reply by email, use:
| dlripber@one.net
|________


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

Date: Tue, 8 Jul 1997 09:29:10 -0700
From: Matt Roper <mattrope@mdhost.cse.tek.com>
To: F J Deng <fdeng@cc.memphis.edu>
Subject: Re: Can an array have two subscripts (i.e., @array (i,j))?
Message-Id: <Pine.SUN.3.95q.970708092738.6364I-100000@tekgp4.cse.tek.com>

On Sun, 6 Jul 1997, F J Deng wrote:

> Sorry for asking a question that may be too elementary.  Can an array
> have two subscripts, such as @array(i,j)?  I have looked my Teach
> Yourself Perl 5 in 21 days and found no answer.
> 
> Thanks for helping.
> 
> Johnny
> 
> 
> 

I read somewhere that there is no built in way to do this, but you can
trick perl into emulating this by using an associative array with keys
such as "1,2", "4,8", etc.  I haven't tried this, but it should work.  
Hope this helps.

==============
Matt Roper
mattrope@mdhost.cse.tek.com



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

Date: Wed, 9 Jul 1997 08:18:13 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: "Brent J. Petit" <petitb@space.augsburg.edu>
Subject: Re: double cast?
Message-Id: <Pine.GSO.3.96.970709081614.14216E-100000@kelly.teleport.com>

On Tue, 8 Jul 1997, Brent J. Petit wrote:

> I am reading bytes from a raw data file running some bitwise operations
> on these values. I can't seem to find a way of casting these values as
> doubles now. i.e. (double)myData. 

Perl will make those doubles as needed. It's automatic, and there's
normally nothing you should (or can) do about it. 

Or maybe I've misunderstood your situation. If you think that's the case,
please post again with a little more information on what values you're
unable to get Perl to give you. Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 9 Jul 97 15:00:31 GMT
From: Joshua Pincus <froboz@roundtable.cif.rochester.edu>
Subject: FTP and Perl
Message-Id: <1997Jul9.150031.5598@galileo.cc.rochester.edu>

I need to write an automated FTP program in Perl.  The program needs to be able
to communicate with the remote FTP daemon in the language spelled out in
RFC959.  

I'll be honest and tell you that I have never written a socket-based Perl
program before.  It doesn't look hard, and I know that there is plenty of info
in the Perl FAQ.  My question is this:  Hooking up with the daemon doesn't look
bad, but I have absolutely NO idea how I can implement the data stream in FTP
to actually GET the data from one place to the other.  

Anyone have some suggestions?  Any help would be greatly appreciated.

JP,
Novice Perl Programmer


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

Date: 8 Jul 1997 20:20:46 GMT
From: gerben@cs.vu.nl (Gerben Vos)
Subject: Re: how to s '?' ?
Message-Id: <5pu7eu$6u7@star.cs.vu.nl>

Yee Man, Chan writes:

>I tried to substitute '?' but unsuccessful. Can you tell me how to
>substitute '?' and why what I did doesn't work?

>$line = 'ax?yb';
>$temp = 'x?y';
>$_ = $temp;
>tr/a-z/A-Z/;
>$line =~ s/$temp/$_/;
>print $line; # what I want is 'aX?Yb' but what I get is 'ax?yb'

'?' is a special character in regular expressions. It means "zero or one
of the previous item". (There are more special characters, read the perlre
manual page.)

When you do s/$temp/$_/ in your example code, you actually do s/x?y/X?Y/ .
Now, in the first part, /x?y/ means "zero or one x'es, followed by and y".
It won't match the '?' character at all! Instead, it matches the y,
which is then replaced by "X?Y", making "ax?X?Yb".

I wonder how you get "ax?yb", but anyway.

To match a '?', you need to quote it. You can do that by inserting a '\'
in front of it. You can also let Perl take care of the quoting by
putting "\Q" in front of your regexp, like this: s/\Q$temp/$_/ .

 . . . . . . . . . . . . . . . . . . . . . . . . . . . G e r b e n   V o s   <><
mailto:gerben@cs.vu.nl                           http://www.cs.vu.nl/%7Egerben/
Misery is much more serious than pleasure, but it is not more important.
                                        -- Herman Finkers


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

Date: Sat, 05 Jul 1997 22:02:31 -0500
From: Matt Froemsdorf <mwf1@engr.uark.edu>
Subject: Re: HTTP SOCKET SUPPORT
Message-Id: <33BF0AC7.C6D@engr.uark.edu>

> > Are HTTP sockets supported under perl?  How would I connect to a site
> > and copy the html page?
> 
>         perldoc perlipc

I tried writing a very simple PERL program using HTTP sockets, based on
the example given in the llama book.  If I change the port number to
daytime (port 13), everything works fine.  If I use the HTTP port, it
hangs (nothing happens, no error messages are displayed, and I have to
kill the process to get back to a command prompt).  I also know I'm
using the right port and the right HTTP syntax, because if I enter the
following at the shell prompt:

telnet localhost 80
GET /index.html

everything works just fine.  Any ideas as to what I could be doing
wrong?  Here's the source:

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

#!/usr/local/bin/perl -w

require 'sys/socket.ph';

$sockaddr = 'S n a4 x8';
$hostname = 'localhost';
($name, $aliases, $proto) = getprotobyname ('tcp');
$port = 80;
($name, $aliases, $type, $len, $thisaddr) = gethostbyname ($hostname);
$thisport = pack($sockaddr, &AF_INET, 0, $thisaddr);
$thatport = pack($sockaddr, &AF_INET, $port, $thisaddr);

socket (S, &PF_INET, &SOCK_STREAM, $proto) || die "cannot create
socket\n";
bind (S, $thisport) || die "cannot bind socket\n";
connect (S, $thatport) || die "cannot connect socket\n";
send (S, "GET /index.html", 0) || die "cannot send over socket\n";
while (<S>) { print; }
exit 0;

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

All help would be greatly appreciated.


Matt Froemsdorf


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

Date: 9 Jul 1997 13:37:49 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: I just dont't get this -- opening a new filehandle
Message-Id: <5q047d$bdp@fridge-nf0.shore.net>

topaz56@one.net wrote:

: I stand by what I said before, you're a bunch of assholes...

Sorry that you feel this way, but you've voluntarily posted to this
newsgroup.  We're offering our time and services for free - most of us
happily answer relevant questions, but a good portion of us despise 
answering the same question(s) over and over again - that's why
there's a FAQ.

Then again, if you're genuinely feeling these sentiments, I would
suggest unsubscribing from this newsgroup immediately and never
returning - most of the people you don't think fondly of probably
won't be leaving anytime soon.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: Wed, 9 Jul 1997 12:10:46 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: mkdir w/ perl & chmod blah blah
Message-Id: <adelton.868450246@aisa.fi.muni.cz>

jlinscom <jason@koolsites.com> writes:

> can perl execute the command: "mkdir dirname" ???
> 
> i am wanting to create directories and files using perl, and have the
> files approved to be used by anyone.  this is the command sequence i'm
> thinking....  maybe i should start thinking perl and less dos?

You probably wanted:

> mkdir "school";
> open(FILE,">school/$filename");
> print FILE "whatever";
> close(FILE);
> 
> make the directory named "school".
> write the file named what ever $filename is.
> and save it in the school directory.
> now, don't i have to chmod 755 $filename?

It depends on you umask. You can certainly do

chmod 0755, "school/$filename";

just to play it safe.

Hope this helps.

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: Tue, 8 Jul 1997 15:44:25 GMT
From: zjat02@trc.amoco.com (Jon A. Tankersley)
Subject: multiplatform perl...
Message-Id: <ED0Bq1.Jvp@trc.amoco.com>
Keywords: multiplatform architecture perl

Got a question for the collective mind....
I've got to build perl for multiple architecture in a location other than
/usr/local/bin....

Is there an easy way for me to have a front end script for perl that
would properly invoke the binary I need?  The 

#!/mypath/to/perl
eval "exec /mypath/to/perl -S $0 $*"
if $running_under_some_shell;
	# this emulates #! processing on NIH machines.
	# (remove #! line above if indigestible)


doesn't work for all of our programs, especially setuid/tainted programs.

What I've got in place at present is:

#!/bin/sh
case `/bin/uname -s` in
    IRIX*)
	exec /apps/sgi/bin/perl5.00320 $*
	;;
    SunOS)
	case `/bin/uname -r` in
		4.1*|1.*)
		    exec /apps/SunOS/bin/perl5.00320 $*
		    ;;
		5.*|2.*)
		    exec /apps/Solaris/bin/perl5.00320 $*
		    ;;
	        *)
		    exec /apps/SunOS/bin/perl5.00320 $*
		    ;;
	esac
	;;
    *)
        echo "Can't run Perl for `/bin/uname -s` this way"
        ;;
esac


Ugly, I know, but....
-- 
-tank-
#include <std/disclaimer.h>	/* nobody knows the trouble I .... */
tank@trc.amoco.com    ..!uunet!apctrc!tank


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

Date: Tue, 8 Jul 1997 23:11:13 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: pattern matching problem
Message-Id: <113vp5.4t9.ln@localhost>


[ emailed, posted ]


Mark W. Manley (mwm3q@ultra1-2.unixlab.Virginia.EDU) wrote:
: I've got a pattern matching problem which is driving me absolutely
: bonkers.  

deja vu...  ;-)


: I have a marked up SGML file which contains, of course, series
: of SGML tags.  Now, what I want to do is simply remove all the
: underscores from those tags and replace those underscores with periods.
: Seems extremely simple, but no matter which pattern I try to have it
: match, the compiler will go gaga on me, matching a whole line if it
: begins and ends with a tag, or skipping tags, or doing other crazy
: stuff.  I was wondering if someone out there knows what code I need to
: stick in to match a line such as:

: <tag data="underscore_to_change">some information</tag>


but you haven't specified what you want to happen in several cases
different from the single test case you have there.

I assume that it should leave the underscores alone in they are between
the tags (in the PCDATA)? Should have one in the test case then so you
can check that it is left alone ;-)

Do you want to also substitute for underscores in the Generic Identifier?
eg: <tag_o_rama>...</tag_o_rama>

I will assume that you want _all_ underscores between the STAGO/ETAGO 
and the TAGC (the angle brackets).

It gets more involved if some underscores within the tags must
be left alone...


: I've tried, after setting my $_ variable and seting $* = 0, using:
: /<.*>?/g;

: $anytag =~ $&;
             ^^
Using these special variables (along with $` and $') anywhere in your
program, will slow down your entire program.

I usually just wrap the whole pattern in parens and use $1 instead.


: $& =~ tr/_/./g;

: I am using perl 5, if this helps...

Good. Then the perlvar man page snippet below applies (my underlining added):

--------------------
=item $MULTILINE_MATCHING

=item $*

Set to 1 to do multiline matching within a string, 0 to tell Perl
that it can assume that strings contain a single line, for the purpose
of optimizing pattern matches.  Pattern matches on strings containing
multiple newlines can produce confusing results when "C<$*>" is 0.  Default
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
is 0.  (Mnemonic: * matches multiple things.)  Note that this variable
only influences the interpretation of "C<^>" and "C<$>".  A literal newline can
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
be searched for even when C<$* == 0>.

Use of "C<$*>" is deprecated in Perl 5.
                  ^^^^^^^^^^^^^^^^^^^^
--------------------


With perl5 you use the 'm' modifier instead of $*:  s///m

As $* _only_ influences ^ and $, it has no effect for your regex above
anyway, because it doesn't _have_ any ^ or $ to be influenced.


: My second problem, which actually really wouldn't matter if the first
: problem is solved, is sort of an exception handling problem, but it also
: has something to do with pattern matching.  Sometimes, lines have open (
: marks but no close ) marks on the same line.  Those ) come later.  While
: the perl compiler hits those lines, I get a "chunk" error.  I believe
: that the compiler is seeing the ( as some sort of special character and
: is trying to evaluate an expression.  Any ideas how to solve this
: problem will also be appreciated...

I don't think perl is placing any special interpretation on data
that it reads in. The problem is somewhere else, or you told it
to interpret it somewhere.

Can you make a small example program that does what you describe?

I don't think I understand what this second problem is.

Your program should be able to handle this type of legal SGML though:

<tag 
 data
 =
 "underscore_to_change"
>some information</tag      >


: If you have any ideas on how to solve either problem (esp. the first,
: which is more critical!), 


---------------------------
#! /usr/bin/perl -w

$_ = qq(<tag_o_rama data="underscore_to_change">some_information</tag_o_rama>\n);

1 while s/(        # remember matched chars in $1
           <       # match open angle bracket
           [^>]*   # match zero or more of any char _except_ close angle bracket
          )        # stop remembering
          _        # pesky underscore, say bye-bye...
         /$1./gx;  # replace with what was remembered above and a dot

print;



$_=<<ENDSGML;
<tag_o_rama
 data
 =
 "underscore_to_change"
>some_information</tag_o_rama      >
ENDSGML

1 while s/(<[^>]*)_/$1./g;
print;
---------------------------


: please e-mail me at "mwm3q@virginia.edu".  My

OK


: news gateway and reader go bonkers sometimes, but our e-mail system is
: relatively stable.


: Thanks!

You're welcome.


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: Wed, 9 Jul 1997 08:39:53 GMT
From: ddurand@hpplus14.cern.ch (Jean-Damien Durand)
To: mwm3q@virginia.edu
Subject: Re: pattern matching problem
Message-Id: <ED1MqI.1v7@news.cern.ch>


> <tag data="underscore_to_change">some information</tag>
> 
> I've tried, after setting my $_ variable and seting $* = 0, using:
> /<.*>?/g;
> $anytag =~ $&;
> $& =~ tr/_/./g;

  What about:
$_ = '<tag data="underscore_to_change">some information</tag>' ;
tr/_/\./ if /<.*>?/ ; # Result is in $_
  ? 
  Cheers,         Jean-Damien.
--
       *******************************************************
       *   Jean-Damien Durand (Jean-Damien.Durand@cern.ch)   *
       *         www : http://wwwcn.cern.ch/~ddurand/        *
       *******************************************************


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

Date: Wed, 09 Jul 1997 09:47:20 -0400
From: Dan Boorstein <dboorstein@ixl.com>
To: "Mark W. Manley" <mwm3q@ultra1-2.unixlab.Virginia.EDU>
Subject: Re: pattern matching problem
Message-Id: <33C39668.19706EFF@ixl.com>

Hello,

$_ = <<'EOT';
<tag data="underscore_to_change">some i_nformation</tag>
<tag
data="underscore_to_change"
moredata="with_txt">some i_nformation</tag>
EOT

s,_(?=[^<]*?>),.,gs;
print $_, "\n";

In plain english I am replacing any underbar, from which we
can look ahead to the closest > and not find any <'s along the
way, with a period. I am not an SGML specialist, so I am assuming
all of your angle brackets are matched and contain only SGML tags.

Dan Boorstein

Mark W. Manley wrote:
> 
> I've got a pattern matching problem which is driving me absolutely
> bonkers.  I have a marked up SGML file which contains, of course, series
> of SGML tags.  Now, what I want to do is simply remove all the
> underscores from those tags and replace those underscores with periods.
> Seems extremely simple, but no matter which pattern I try to have it
> match, the compiler will go gaga on me, matching a whole line if it
> begins and ends with a tag, or skipping tags, or doing other crazy
> stuff.  I was wondering if someone out there knows what code I need to
> stick in to match a line such as:
> 
> <tag data="underscore_to_change">some information</tag>
> 
> I've tried, after setting my $_ variable and seting $* = 0, using:
> /<.*>?/g;
> $anytag =~ $&;
> $& =~ tr/_/./g;
> 
> I am using perl 5, if this helps...
> 
> My second problem, which actually really wouldn't matter if the first
> problem is solved, is sort of an exception handling problem, but it also
> has something to do with pattern matching.  Sometimes, lines have open (
> marks but no close ) marks on the same line.  Those ) come later.  While
> the perl compiler hits those lines, I get a "chunk" error.  I believe
> that the compiler is seeing the ( as some sort of special character and
> is trying to evaluate an expression.  Any ideas how to solve this
> problem will also be appreciated...
> 
> If you have any ideas on how to solve either problem (esp. the first,
> which is more critical!), please e-mail me at "mwm3q@virginia.edu".  My
> news gateway and reader go bonkers sometimes, but our e-mail system is
> relatively stable.
> 
> Thanks!
> MM


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

Date: Wed, 09 Jul 1997 17:25:11 +0200
From: Aldo Calpini <dada@divinf.it>
To: Miran Sepic <miran.sepic4@mss.tel.hr>
Subject: Re: Perl & MsAccess
Message-Id: <33C3AD57.7287C7FE@divinf.it>

Miran Sepic wrote:
> 
> How can I use MSAcess Database with Perl?

Get the Win32::ODBC module from:
http://www.perl.com/CPAN/authors/Dave_Roth/

Bye,
Aldo Calpini
---/\-----------------------------------------------------------
--/  \--------------------------------- mailto:dada@divinf.it --
-<dada>-- POPULUS VULT DECIPI, -------- mailto:sis@divinf.it ---
--\  /------- ERGO DECIPIATUR --------- http://sis.divinf.it ---
---\/-----------------------------------------------------------


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

Date: Tue, 08 Jul 1997 11:45:17 -0700
From: Geoff Sherman <gssherma@schmelze.corp.hp.com>
Subject: Perl and Sockets
Message-Id: <33C28ABD.45BD@schmelze.corp.hp.com>

Hello all,
	I am working on a client/server app that is written in Perl. I am
looking to read in a filename from the command line, pass it to the
server, have the server open up the file and send its contents back to
the client application. I have gotten past reading in the filename from
the command line, but I am gaving a hard time with the actual socket
stuff. Do I use read()/write() or do I use send()/recv()? I have looked
all over the Net for stuff and through the camel books, but can't find a
very good explanation. Any examples of this in Perl that you can point
me to on the net or any help that you can provide would be most
appreciated. Thank you for your help.
					Geoff Sherman
					gssherma@schmelze.corp.hp.com


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

Date: 9 Jul 1997 10:05:47 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: perl CGI on NT- can't read CGI.pm
Message-Id: <5pvnpr$6rf@lyra.csx.cam.ac.uk>

Joe Laffey  <joe@laffey-stl.com> wrote:
>
>Can't call method "import" in empty package "cgi" at

Remember that Perl is case-sensitive.   That module is called CGI.pm, not
cgi.pm.    I suspect you've got "use cgi;" instead of "use CGI;".


Mike Guy


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

Date: 9 Jul 1997 13:06:36 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Q: Mail::Send
Message-Id: <5q02cs$9h1@fridge-nf0.shore.net>

Dirk Haenelt (dhaen@eeiwzb.et.tu-dresden.de) wrote:

: i have a problem by using the Mail package from Tim Bunce.
: When i will send a mail with this source:

If I'm correct Mail::Send is sending a ~s to mail (the program called
mail) - I've noticed that this doesn't work with the version of mail 
I'm using on FreeBSD but works with the mail program I'm using on SUN OS
4.1.3.

Try using sendmail (or something else) instead - I believe these are
discussed in the Mail::Send pod.  I've not had any problems using
sendmail instead of mail.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: Wed, 9 Jul 1997 08:49:16 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: JChrisen <jchrisen@aol.com>
Subject: Re: Sending file back to directory?
Message-Id: <Pine.GSO.3.96.970709084750.14216K-100000@kelly.teleport.com>

On 9 Jul 1997, JChrisen wrote:

> The problem we are having is once the file is converted what
> script is needed to send the file back to the user.  

Usually you can use a script which prints the contents of the file.

> We could also use something as simple as sending the file to a certain
> directory. 

That's documented in perlfunc, under open. Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 09 Jul 1997 16:48:16 +0200
From: Joelle D'Antin & Nicolas Gregoire <dantin@icp.grenet.fr>
Subject: Simple.pm
Message-Id: <33C3A4B0.1087@icp.grenet.fr>

Hi,
do you know where can I find Simple.pm ??

(the exact adress, please)

	Thanks

nico


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

Date: Tue, 08 Jul 1997 18:23:06 -0500
From: Bryan Hart <bryan@eai.com>
Subject: Re: SSI's in CGI output
Message-Id: <33C2CBDA.3F54@eai.com>

Cliff Shaw wrote:
> 
> How can I have SSI's work in the output produced by my CGI scripts.
> 
> Thanks
> Cliff
> cliff@shawfamily.com

My question is:  Why do you want to do that?

Why not just include or recreate the SSI in your CGI??

It seems silly to (and much slower) to output static info (HTML) from a
dynamic source (CGI) that calls another dynamic source (SSI), when the
CGI and SSI can be combined before outputting the HTML.
-- 
-------------------------------
|  Bryan Hart                 
|  Network Products Engineer  
|  Engineering Animation Inc. 
|  Phone: (515) 296-5979
|  Fax: (515) 296-7025
|  Email: bryan@eai.com              
|  Web: http://www.eai.com/                          
-------------------------------
"A conclusion is simply the place where you got tired of thinking"


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

Date: Wed, 09 Jul 1997 04:05:34 GMT
From: over@the.net (dave)
Subject: Re: TOP 5 REASONS FOR SWITCHING TO PERL
Message-Id: <33c30da1.24630567@news.one.net>

over@the.net (dave) wrote:


Thanks everyone for your input.  I will be presenting your comments,
mostly unedited, to our software group tomorrow.  That way I won't
have to dodge so many bullets myself :)


Dave
|
| Please visit me at http://w3.one.net/~dlripber
|
| For reply by email, use:
| dlripber@one.net
|________


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

Date: Wed, 09 Jul 1997 10:59:07 +0200
From: dischner@_NO_SPAM_med.uni-muenchen.de (Anton Dischner)
Subject: Re: TOP 5 REASONS FOR SWITCHING TO PERL
Message-Id: <dischner-ya02408000R0907971059070001@news.lrz-muenchen.de>

Hi Dave,

what i like best are the excellent warnings (if enabled) and
the debugger.

Your collueges will love this features especially if they are new to
Perl (as I am).

Kind regards,

Toni

In article <33bae5a2.1623088@news.one.net>, over@the.net wrote:

> Excuse the caps, but I REALLY need some assistance!
> 
> I did some Web programming in perl and fell in love with it like so
> many other people.  So I took it to work and began using it instead of
> ksh.  Also downloaded the Tk extension and did a trial application.
> 
> Now I need to present it to the rest of the software programmers that
> use ksh and haven't tried perl.
> 
> I'm hoping some more experienced perl programmers in this newsgroup
> can tell me the main reasons why someone should switch from ksh/csh
> scripts to perl scripts.
> 
> 
> Thanks,
> Dave
> |
> | Please visit me at http://w3.one.net/~dlripber
> |
> | For reply by email, use:
> | dlripber@one.net
> |________

-- 
A. Dischner, SGI&AIX sysadmin, Oracle DBA       | Don't let friends
Institut fuer Klinische Chemie                  | use WinDose
Klinikum Grosshadern                            | Just say NO. 
Ludwig Maximilians Universitaet Muenchen,  GER  | Please remove            
Marchioninistr.15 81366 Muenchen 49-89-70953202 | _NO_SPAM for email.


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

Date: Sun, 6 Jul 1997 00:52:27 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: URL counter?
Message-Id: <ECvH3G.3Kn@nonexistent.com>

Jeff Davis (jeff@jehosophat.com) wrote on 1403 September 1993 in
<URL: news:slrn5rq7q7.v3r.jeff@photuris.jehosophat.com>:
++ I am looking for a script to count URLs on a Web page and report
++ the total via a SSI.
++ 
++ Anyone seen anything like that already done or do I need to
++ roll my own?

There's a regex for URLs on http://www.ny.fnx.com/abigail/Perl/url.html.


Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=$]*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


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

Date: 9 Jul 1997 13:11:40 GMT
From: neilkohl@netaxs.com (Neil Kohl)
Subject: Re: Win32 & FTP
Message-Id: <slrn5s73gc.430.neilkohl@unix5.netaxs.com>

On Tue, 08 Jul 1997 09:21:35 -0500, Buxx <buxx@buxx.com> wrote:

>anyone know of a NET:FTP module for Win32 Perl or 
>a multi-file ftp upload/download script without 
>using the FTP module.

As far as I know, the easiest way to do it is to open up a filehandle to
ftp.exe and send commands to it:

    open FTP, "| $FTP -ni www.someplace.com" 
	or send_mail_and_die ("Can't open $FTP: $!");
    print FTP "user name passwd\n";
    # send ftp commands here...
    print FTP "quit\n";
    close FTP; 

Ugly, and the stock FTP client on NT tends to hang a bit.

There's a few other suggestions in the Perl/Win32 faq...

http://www.endcontsw.com/people/evangelo/Perl_for_Win32_FAQ_8.html#8_6

-- 
neil kohl
=====================================================================
neilkohl@netaxs.com |             "A long quiet like a purge and then
philadelphia, pa    |    a contemplation and decision of future roads,
usa                 |                 that is what to look forward to." 
                    |                       - T.E. Lawrence, 15.vi.18
=====================================================================


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

Date: Wed, 09 Jul 1997 16:04:33 +0200
From: Stephen Riehm <sr@pc-plus.de>
Subject: X.25 communications via perl?
Message-Id: <33C39A71.41C6@pc-plus.de>

Hi,

I've checked through the FAQ's and even did a search on DejaNews, but
I haven't seen any reference to X.25 via perl.

Does anyone know of a way of driving a X.25 connection with a perl
program?
X25 module?

Thanks in advance,

Steve
//   __________________________ ._ o  ________________________________
\\\\ Stephen Riehm             /  //\.        Stephen.Riehm@pc-plus.de
//// pc-plus                  '  \>> |         Phone: +49 89 45566 148
  \\ 81675 Munich, Germany        \\ `           Fax: +49 89 45566 113


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 714
*************************************

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