[16087] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3499 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 28 09:05:22 2000

Date: Wed, 28 Jun 2000 06:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <962197510-v9-i3499@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 28 Jun 2000     Volume: 9 Number: 3499

Today's topics:
        $_ and @_ use? <alun.moon@ncl.ac.uk>
    Re: $_ and @_ use? <news@fido.workone.com>
    Re: about time out! <graham.wood@iona.com>
    Re: about time out! <Peter.Dintelmann@dresdner-bank.com>
        Convert value to numeric <wball@wweb.co.uk>
    Re: Convert value to numeric <Peter.Dintelmann@dresdner-bank.com>
    Re: file input <kirillm@fido.workone.com>
    Re: Golf problem (Abigail)
    Re: Golf problem <hump@katz.cc.univie.ac.at>
    Re: How can I use perl to print $ in a string? <graham.wood@iona.com>
    Re: How can I use perl to print $ in a string? (Abigail)
    Re: How can I use perl to print $ in a string? <pap@NOTHEREsotonians.org.uk>
    Re: How to access all the files in a dir including its  (Keith Calvert Ivey)
    Re: how to count number of line in a file ? (Abigail)
        Image::Magick installation failed <lucas@cplhk.com>
    Re: newbie REGEX problem (Keith Calvert Ivey)
        Permissions -is 750  full read write access? (Bill Evans)
    Re: Sending HTML messages, using perl and sendmail <vikas@youssef.de>
    Re: Sending HTML messages, using perl and sendmail <Peter.Dintelmann@dresdner-bank.com>
        sending SMS <christian.wagner@epcos.com>
    Re: sending SMS <news@fido.workone.com>
    Re: sending SMS <christian.wagner@epcos.com>
    Re: shift in sub <sun_tong_001@yahoo.com>
    Re: Teen Volenteers WANTED (Abigail)
    Re: Teen Volenteers WANTED gevens@my-deja.com
    Re: Uninterpolated quoting and \ <phrxy@csv.warwick.ac.uk>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 28 Jun 2000 11:38:03 +0100
From: Alun Moon <alun.moon@ncl.ac.uk>
Subject: $_ and @_ use?
Message-Id: <3959D58B.CE9C53A@ncl.ac.uk>

I've been trying to learn more about using $_ and @_ as default parameters and
returns from functions.

Largely trial and error so far.

Do they work with things like

while(shift){
  # do something
}

I can't find a definitive answer in the perlfaq.

Any answers

Alun Moon


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

Date: Wed, 28 Jun 2000 13:11:12 +0200
From: Kirill Miazine <news@fido.workone.com>
Subject: Re: $_ and @_ use?
Message-Id: <Pine.SOL.4.21.0006281304470.17579-100000@ulrik.uio.no>

On Wed, 28 Jun 2000, Alun Moon wrote:

# I've been trying to learn more about using $_ and @_ as default parameters and
# returns from functions.
# 
# Largely trial and error so far.
# 
# Do they work with things like
# 
# while(shift){
#   # do something
# }
# 

I don't think it's possible:


this would'n print anythig useful:
perl -e '&foo(1,2,3,4);sub foo { while(shift) {print "$_\n"}}'

But this works:

perl -e '&foo(1,2,3,4);sub foo { while($_ = shift @_) {print "$_\n"}}'


# I can't find a definitive answer in the perlfaq.
# 
# Any answers
# 
# Alun Moon
# 



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

Date: Wed, 28 Jun 2000 10:58:11 +0100
From: "Graham Wood" <graham.wood@iona.com>
Subject: Re: about time out!
Message-Id: <8jcihg$q90$1@bvweb.iona.com>

I don't think you can do it with CGI.  Your CGI script isn't run until the
user pushes the submit button.  You'd have to use something other than CGI.

Graham Wood
Kwok Chi Hang <chkwok@unitechnetworks.com> wrote in message
news:3959c940$1@newsgate.hknet.com...
> I want my CGI script can do something when user does not click the submit
> button in the form for 2 hours. How can I do it?
> Thanks
>
>
>




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

Date: Wed, 28 Jun 2000 12:53:00 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: about time out!
Message-Id: <8jclcm$7mv4@intranews.dresdnerbank.de>

    Hi,

Kwok Chi Hang schrieb in Nachricht <3959c940$1@newsgate.hknet.com>...
>I want my CGI script can do something when user does not click the submit
>button in the form for 2 hours. How can I do it?

    you can't. This has nothing to do with Perl at all
    by the way. It is simply because of c/s things...

        Peter Dintelmann





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

Date: Wed, 28 Jun 2000 10:53:42 +0100
From: "William Ball" <wball@wweb.co.uk>
Subject: Convert value to numeric
Message-Id: <962186835.4642.0.nnrp-14.c2debccb@news.demon.co.uk>

Hi,
This has got to be dead simple!  I'm pretty new to PERL, but have managed to
put together pretty much all I need apart from one point.  I've a field I
use to build up an SQL command that was originally input by the user.  It
'should' contain just a number (maybe with a decimal point), but I've had
instances of users entering letters and currency symbols that then mess up
the SQL command.  I guess I could split the field up and character by
character only let through 0 - 9 and '.', but I'm guessing there must be an
easier way.  I experimented with printf but couldn't get it to work.
Ideally all I want is
$NumericValue = functionIdontknowthenameof($InputValue);
or similar.
Thanks
William Ball




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

Date: Wed, 28 Jun 2000 13:34:02 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: Convert value to numeric
Message-Id: <8jcnpl$7md9@intranews.dresdnerbank.de>

    Hi,

William Ball schrieb in Nachricht
<962186835.4642.0.nnrp-14.c2debccb@news.demon.co.uk>...
>Ideally all I want is
>$NumericValue = functionIdontknowthenameof($InputValue);

    functionIdontknowthenameof() depends on the
    features you want to support ;-)
    There is an automatic string->number conversion
    in Perl which scans the string from the left (have a
    look at the docu for the details). All you need to do
    is tell Perl that your string "is" a number, e.g. by
    adding a 0:

        $var = '123.45asdf';
        print 0+$var;    # prints 123.45

    Best regards,

        Peter Dintelmann





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

Date: Wed, 28 Jun 2000 12:54:36 +0200
From: Kirill Miazine <kirillm@fido.workone.com>
To: Christophe Gijbels <Gizzzmo@pandora.be>
Subject: Re: file input
Message-Id: <Pine.SOL.4.21.0006281244340.17579-100000@ulrik.uio.no>

Of course it's possible. But there is more than one way to do it.
I prefer to have the things to substitute in a hash, like  
$hash{'variable'} = "qwerty";

then you just do following

$hash{'alfa'} = "beta";
open(FILE, "some.file");
while (<FILE>) {
	s/\$([a-z0-9_]+)/$hash{$1}/ige;
	print;
}
close FILE;



or without hashes:



$alfa = "beta";
open(FILE, "other.file");
while(<FILE>) {
	s/(\$[a-z0-9_]+)/eval ($1)/ige;
	print;
}
close FILE;


On Tue, 27 Jun 2000, Christophe Gijbels wrote:

# Hi
# 
# Is there a way to make sure that when I read a line from a file, and that
# line has the string $variable. That $variable gets his value and so when I
# print it, not $variable is printed but his value ?
# 
# Content of the file:
#     This is the line whith the variable : $variable
#     This is another line
# 
# test.pl
# #!/usr/bin/perl
# 
# open (FILE, "file");
# $variable=10;
# while (defined ($line=<FILE>))
# {
#     print "$line\n";
# }
# close FILE;
# 
# I've tried many different things but it keeps on printing $variable.
# And using regulaire expressions isn't that useful because this example shows
# one variable but I want to use it on a lot of variables.

Regexpes ARE useful :)

# 
# Is this possible or is it just a fantasie of me ?
# 
# Christophe
# 
# 
# 
# 
# 



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

Date: 28 Jun 2000 06:31:59 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: Golf problem
Message-Id: <slrn8ljm2r.ka1.abigail@alexandra.delanet.com>

Peter Marksteiner (hump@katz.cc.univie.ac.at) wrote on MMCDXCIII
September MCMXCIII in <URL:news:8jcgqm$29vm$1@www.univie.ac.at>:
][ Suppose you want to find words with exactly ten non-repeating letters such
][ as "binoculars", "fishmonger", or "paintbrush", suitable for games or simple 
][ encryption of numbers where every decimal digit is represented by a letter.
][ 
][ I've tried to write the shortest possible Perl program to extract
][ such words from a wordlist and have found the following two solutions:
][ 
][ perl -pe '%c=();length==11&!grep{$c{$_}++}split""or$_=""' /usr/dict/words
][ perl -pe '$_=""if(keys%{{map{$_,1}split""}})*length!=121' /usr/dict/words
][ 
][ Is there anybody who can do it with fewer keystrokes?

Saving one stroke:

   perl -pe '%c=();/^.{10}$/&!grep{$c{$_}++}split""or$_=""' /usr/dict/words


However, the solution is wrong. One of returned words is:

    Stravinsky

which has twice the letter s, but in different capitalization.

You can fix that by using one extra stroke:

    perl -pe '%c=();/^.{10}$/&!grep{$c{+lc}++}split""or$_=""' /usr/dict/words

And that will still fail if there are hyphens or other punctuation
marks present.


Abigail
-- 
BEGIN {my $x = "Knuth heals rare project\n";
       $^H {integer} = sub {my $y = shift; $_ = substr $x => $y & 0x1F, 1;
       $y > 32 ? uc : lc}; $^H = hex join "" => 2, 1, 1, 0, 0}
print 52,2,10,23,16,8,1,19,3,6,15,12,5,49,21,14,9,11,36,13,22,32,7,18,24;


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

Date: 28 Jun 2000 12:46:49 GMT
From: Peter Marksteiner <hump@katz.cc.univie.ac.at>
Subject: Re: Golf problem
Message-Id: <8jcs3p$g20$1@www.univie.ac.at>

Abigail <abigail@delanet.com> wrote:
: Saving one stroke:

:   perl -pe '%c=();/^.{10}$/&!grep{$c{$_}++}split""or$_=""' /usr/dict/words

: However, the solution is wrong. One of returned words is:

:     Stravinsky

: which has twice the letter s, but in different capitalization.

I was aware of this limitation of my solutions.

: You can fix that by using one extra stroke:

:   perl -pe '%c=();/^.{10}$/&!grep{$c{+lc}++}split""or$_=""' /usr/dict/words

: And that will still fail if there are hyphens or other punctuation
: marks present.

Or trailing whitespace. The original solutions solve the problem
"find all strings of exactly ten distinct characters, no matter what the 
characters are" (if you can't fix the solution to solve the problem,
modify the problem to match the solution).

   Peter

-- 
Peter Marksteiner
Vienna University Computer Center


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

Date: Wed, 28 Jun 2000 11:13:40 +0100
From: "Graham Wood" <graham.wood@iona.com>
Subject: Re: How can I use perl to print $ in a string?
Message-Id: <8jcjeh$qc4$1@bvweb.iona.com>

You need to escape the $ with a \.

print "Total amount is S\$100";

Graham Wood

shaohong <chenshaohong@sim.edu.sg> wrote in message
news:8jchql$9mt$1@newton3.pacific.net.sg...
> Hi,
>
> Since $ is a reserve character in Perl. If I want to print $ in a string,
> for example I want to print " Total amount is S$100", I only get the
result
> "Total amount is S", $100 is missing!
>
> Need your help. Thanks.
>
> shaohong
>
>




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

Date: 28 Jun 2000 06:40:30 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: How can I use perl to print $ in a string?
Message-Id: <slrn8ljmiq.ka1.abigail@alexandra.delanet.com>

shaohong (chenshaohong@sim.edu.sg) wrote on MMCDXCIII September MCMXCIII
in <URL:news:8jchql$9mt$1@newton3.pacific.net.sg>:
## Hi,
## 
## Since $ is a reserve character in Perl. If I want to print $ in a string,
## for example I want to print " Total amount is S$100", I only get the result
## "Total amount is S", $100 is missing!


    print 'Total amount is S$100';

    print "Total amount is S\$100";

    my $dollar = chr 36; print "Total amount is S${dollar}100";

    print "Total amount is S\x24100";

    print "Total amount is S\044100";

    print "Total amount is S", '$', "100";

    my $dollar = chr 36; print "Total amount is S" . $dollar . 100;

etc, etc...


Abigail
-- 
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
                                      print } sub __PACKAGE__ { &
                                      print (     __PACKAGE__)} &
                                                  __PACKAGE__
                                            (                )


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

Date: Wed, 28 Jun 2000 11:44:50 +0100
From: Paul Taylor <pap@NOTHEREsotonians.org.uk>
Subject: Re: How can I use perl to print $ in a string?
Message-Id: <3959D722.8926AA1B@NOTHEREsotonians.org.uk>

shaohong wrote:
> 
> Hi,
> 
> Since $ is a reserve character in Perl. If I want to print $ in a string,
> for example I want to print " Total amount is S$100", I only get the result
> "Total amount is S", $100 is missing!
> 
> Need your help. Thanks.
> 
> shaohong

You'll need to escape the dollar sign with a backslash.

For example,

print "Total amount is S\$100" ;

Alternatively, if you're using literals, you can just use single quotes.
This will stop the $100 text being treated as a variable and 
consequently interpolated.  

e.g.

print 'Total amount is S$100' ;

Personally, I'd recommend using the escape sequence, as most literals
are
evil.

Pap.


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

Date: Wed, 28 Jun 2000 12:02:58 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: How to access all the files in a dir including its sub dir?
Message-Id: <395de94e.43442333@nntp.idsonline.com>

"multiplexor" <abuse@localhost> wrote:

>For example, print the name of all files in a dir and its sub like the
>command in M$ DOS: dir *.* /s

You probably want to use the File::Find module.

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----


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

Date: 28 Jun 2000 06:43:07 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: how to count number of line in a file ?
Message-Id: <slrn8ljmnn.ka1.abigail@alexandra.delanet.com>

W Kemp (bill.kemp@wire2.com) wrote on MMCDXCIII September MCMXCIII in
<URL:news:962178370.20899.0.nnrp-01.c3ad6973@news.demon.co.uk>:
// 
// 
// I am suggesting the following _because_ it looks inefficient.
// Any comments?
// 
// open a FILE, then:-
// 
// $i=0;
// while(<FILE>){$i++}


Why reinvent the wheel? Look up $. in perlvar.


Abigail
-- 
perl -wlpe '}{*_=*.}{' file  # Count the number of lines.


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

Date: Wed, 28 Jun 2000 19:40:59 +0800
From: "Lucas Tsoi" <lucas@cplhk.com>
Subject: Image::Magick installation failed
Message-Id: <8jco92$q5e6@imsp212.netvigator.com>

Hi all I am to install Image::Magick,

the error messages said:


cc -c -I../ -I.. -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/
path

os/home/cristy/ImageMagick/bzlib -I/pathos/home/cristy/ImageMagick/hdf/hdf/s
rc -

I/pathos/home/cristy/ImageMagick/jbig/libjbig -I/pathos/home/cristy/ImageMag
ick/

jpeg -I/pathos/home/cristy/ImageMagick/zlib -I/pathos/home/cristy/ImageMagic
k/pn

g -I/pathos/home/cristy/ImageMagick/tiff/libtiff -I/pathos/home/cristy/Image
Magi

ck/ttf -I/pathos/home/cristy/ImageMagick/ttf/lib -I/pathos/home/cristy/Image
Magi

ck/ttf/lib/.libs -I/usr/local/include -I/usr/openwin/include -I/usr/openwin/
incl

/X11 -Dbool=char -DHAS_BOOL -I/usr/local/include -O2    -DVERSION=\"5.20\" -
D

XS_VERSION=\"5.20\" -fpic -I/usr/lib/perl5/i386-linux/5.00404/CORE -DHAVE_CO
NFIG
 _H Magick.c
 Magick.xs:78: magick/api.h: No such file or directory
 make: *** [Magick.o] Error 1


and the README document says that i have to LIBS and INC to include the
appropriate path information to the required libMagick library.

But I have no ideas to change the LIBS and INC though I found them at
MAKEFILE.PL
Could anybody tell me how should I do?

Thousands of Thanks!!!!


-----------------------------------------------
## MAKEFILE.PL
-----------------------------------------------
# Generated automatically from Makefile.PL.in by configure.
use ExtUtils::MakeMaker;
use Config;

# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    'NAME' => 'Image::Magick',
    'VERSION_FROM' => 'Magick.pm', # finds $VERSION
    'LIBS' =>
['-L/pathos/home/cristy/ImageMagick/bzlib -L/pathos/home/cristy/ImageMagick/
hdf/hdf/src -L/pathos/home/cristy/ImageMagick/jbig/libjbig -L/pathos/home/cr
isty/ImageMagick/jpeg -L/pathos/home/cristy/ImageMagick/zlib -L/pathos/home/
cristy/ImageMagick/png -L/pathos/home/cristy/ImageMagick/tiff/libtiff -L/pat
hos/home/cristy/ImageMagick/ttf -L/pathos/home/cristy/ImageMagick/ttf/lib -L
/pathos/home/cristy/ImageMagick/ttf/lib/.libs -L/usr/local/lib -L/usr/openwi
n/lib -R/usr/openwin/lib -L/usr/local/lib -lMagick -ljbig -ldf -ltiff -lttf 
-ljpeg -lpng -ldpstk -ldps -lXext -lXt -lX11 -lsocket -lnsl -lbz2 -lz -lpthr
ead -lm'],
    'DEFINE' => '-DHAVE_CONFIG_H',     # e.g., '-DHAVE_SOMETHING'
    'INC' =>
'-I../ -I.. -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/patho
s/home/cristy/ImageMagick/bzlib -I/pathos/home/cristy/ImageMagick/hdf/hdf/sr
c -I/pathos/home/cristy/ImageMagick/jbig/libjbig -I/pathos/home/cristy/Image
Magick/jpeg -I/pathos/home/cristy/ImageMagick/zlib -I/pathos/home/cristy/Ima
geMagick/png -I/pathos/home/cristy/ImageMagick/tiff/libtiff -I/pathos/home/c
risty/ImageMagick/ttf -I/pathos/home/cristy/ImageMagick/ttf/lib -I/pathos/ho
me/cristy/ImageMagick/ttf/lib/.libs -I/usr/local/include -I/usr/openwin/incl
ude -I/usr/openwin/include/X11',
    ($Config{'archname'} =~ /-object$/i ? ('CAPI' => 'TRUE') : ()),
);

#
# Modify the MakeMaker test fragment
#
sub MY::test
{
   #
   # List any ImageMagick features derived from add-on libraries
   # or programs you would like to test.
   #
   # Valid choices are:
   #
   #  Feature   Formats Tested  Prerequisites
   #  =======   ======================
======================================
   #   bzlib    BZip compression        BZip library
   #   cgm CGM format  'ralcgm' program
   #   hdf HDF format  HDF library
   #   jbig JBIG format  JBIG library
   #   jpeg  JPEG format  JPEG library
   #   mpeg MPEG format  'mpeg2decode' & 'mpeg2encode' programs
   #   png PNG format  PNG and Zlib libraries
   #   ps Postscript format 'gs' program and/or DPS library
   #   rad Radiance format  'ra_ppm' program
   #   tiff TIFF format  TIFF library
   #   ttf TrueType font format FreeType library
   #   x X11 support  X-windows libraries and server
   #   xfig Xfig format  'transfig' program
   #   zlib Zip compression  Zlib library
   #
   # e.g. my @DELEGATES = qw/jpeg tiff/;
   #
   my @DELEGATES = qw/ bzlib cgm hpgl hdf jbig jpeg mpeg png ps rad tiff ttf
x xfig zlib/;

   package MY; # so that "SUPER" works right
   my $inherited = shift->SUPER::test(@_);
   my $delegate_tests='';
   my $delegate;
   foreach $delegate (@DELEGATES) {
     if( -d "t/$delegate" ) {
       $delegate_tests .= " t/$delegate/*.t";
    }
   }
   $inherited =~ s:^TEST_FILES =.*:TEST_FILES = t/*.t ${delegate_tests}:m;
   #
   # Only test installed PerlMagick due to portability problems
   # and because PerlMagick does not link against the uninstalled
   # ImageMagick library.
   #
   $inherited =~ s:PERL_DL_NONLAZY=1 ::mg;
   $inherited;
}


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




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

Date: Wed, 28 Jun 2000 12:01:36 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: newbie REGEX problem
Message-Id: <395ce67c.42720559@nntp.idsonline.com>

Nnickee <nnickee@nnickee.com> wrote:
>kcivey@cpcug.org (Keith Calvert Ivey) said:
>
>>Here's one rewrite:
>
>>    foreach (@array) {
>>        if (/stuff/) {
>>            my($out) = m#/(.*)\.#;
>>            print "$_ - $out\n";
>>        }
>>    }
>
>and here's another:
>
>foreach (@array) {
>    if ( /stuff/ && m#/(.*)\.# ) {
>        my $out = $1;
>        print "$_ - $out\n";
>    }
>}
>
[...]
>My question now, why is Keith's better than mine?  (I'm not arguing
>the point, I really want to understand why his way is better than what
>I came up with so I can learn...)

No one said anything about mine being better.  They do behave
differently, though.  Suppose you have a line like this:

    ksbkabkljbhjdstuffbkjbkjbskjbd

Mine will print "ksbkabkljbhjdstuffbkjbkjbskjbd - \n", while
yours will skip it.  We don't know what the original poster
wanted.  I was also trying to change the original as little as I
could.  Here's a rewrite of your rewrite of my rewrite:

    foreach (@array) {
        print "$_ - $1\n" if /stuff/ && m{/(.*)\.};
    }

And then of course there's

    /stuff/ && m{/(.*)\.} && print "$_ - $1\n" for @array;

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----


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

Date: Wed, 28 Jun 2000 10:11:23 GMT
From: wgevans@voyager.co.nz (Bill Evans)
Subject: Permissions -is 750  full read write access?
Message-Id: <395bce7d.6234928@news.voyager.co.nz>

I have three questions related to a script I am
using  that allows the user to upload files via a webpage form to a
directory on the server. The script runs perfectly on one server where
permissions for the directory are set to 711
and the for the file are set to 755 
drwx--x--x -
rwxr-xr-x 

First question :  Is there any point having the file set to 755 when
the directory is set to 711 ?

Second question: 
On another server where I am not allowed to set permissions it does
not run.  This server is running Velocigen.  I have tried running the
script with Velocigen both disabled and enabled. I am told by the
technical support that it is unlikely to be a permissions problem
because all files have full read write access as standard. Permissions
on this server are set to 750 for all files
drwxr-x--- 
-rwxr-x---
 Is  this indeed full read write access? 
Is there anything in these permission settings that could prevent the
script running?

Third question:
Incidentally this second firm "does not have error logs for individual
accounts". 
So I cannot set permissions and I cannot see an error log.
Why would they structure things in this way?  

Thanks
Bill


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

Date: Wed, 28 Jun 2000 13:23:08 +0200
From: Vikas <vikas@youssef.de>
Subject: Re: Sending HTML messages, using perl and sendmail
Message-Id: <3959E01C.144DAD7F@youssef.de>



"Dr. Peter Dintelmann" wrote:

>     Hi,
>
> E. Preble schrieb in Nachricht ...
>     --snip--
> >I want to send
> >HTML formatted messages through PERL, with sendmail if
> >possible.
>
>     everything is possible with perl ;-)
>
> >Typical, text only, messages can be sent as follows:
> >
> >open (MAIL, "|$mailprog -t") || print "Can't start mail
> >program";
> >print MAIL "To: $address\n";
> >print MAIL  "From: $Myaddress\n";
> >print MAIL  "Subject: $subject\n\n";
> >print MAIL "$message";
> >close (MAIL);
>
>     Now get a tutorial on smtp & co. (if you are really
>     interested in email apps get a copy of David Wood's
>     'Programming Internet Email')
>
> >Is there a way to define a text/html message using perl?
>
>     Just send a header line "Content-type: text/html"
>     (print MAIL "Content-type: text/html\n";).
>     (eventually use the charset attribute) and send html
>     content ($message = qq{<html> ... </html>};)

What happens with the following lines of the email, if
Content-type is set to text/html it
(print MAIL "Content-type: text/html\n";)
The following lines contains some more email header.
Would the email client interpret that as html?

Thanks,
Vikas Narula





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

Date: Wed, 28 Jun 2000 13:54:19 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: Sending HTML messages, using perl and sendmail
Message-Id: <8jcovm$7mv6@intranews.dresdnerbank.de>

    Hi and thanks for the reply,

Vikas schrieb in Nachricht <3959E01C.144DAD7F@youssef.de>...
>What happens with the following lines of the email, if
>Content-type is set to text/html it
>(print MAIL "Content-type: text/html\n";)
>The following lines contains some more email header.
>Would the email client interpret that as html?

    The mail consists of two parts: the headers and
    the message body. They are separated by the first
    blank line. Thus everything above the first blank lines
    are headers (which have to be of the form '<header>: <value>')
    and everything after the blank line is content.
    From the blank line the email client distinguishes
    between headers and content.

    The "Content-type" header tells the email client how
    to deal with the content. Thus if content-type equals
    text/html it expects the content to be (valid) html.
    (This has no effect on all the header fields following the
    Content-type header).

    Does this answer your question (by the way we haven't
    discussed any perl topics)?

        Peter Dintelmann





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

Date: Wed, 28 Jun 2000 13:10:51 +0200
From: "Chris M. Wagner" <christian.wagner@epcos.com>
Subject: sending SMS
Message-Id: <8jcma9$b7h$1@news.mch.sbs.de>

Hi, is it possible to send a SMS using perl?
Thanks, Chris




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

Date: Wed, 28 Jun 2000 14:25:49 +0200
From: Kirill Miazine <news@fido.workone.com>
Subject: Re: sending SMS
Message-Id: <Pine.SOL.4.21.0006281425270.10406-100000@ulrik.uio.no>

Sure, as an email!



On Wed, 28 Jun 2000, Chris M. Wagner wrote:

# Hi, is it possible to send a SMS using perl?
# Thanks, Chris
# 
# 
# 



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

Date: Wed, 28 Jun 2000 14:35:41 +0200
From: "Chris M. Wagner" <christian.wagner@epcos.com>
Subject: Re: sending SMS
Message-Id: <8jcr9b$f4d$1@news.mch.sbs.de>

And to which adress do I have to send the mail? (free - if possible :-)   )

> Sure, as an email!





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

Date: 28 Jun 2000 09:15:14 -0300
From: * Tong * <sun_tong_001@yahoo.com>
Subject: Re: shift in sub
Message-Id: <sa8pup20zot.fsf@sun_tong_001.personal.yahoo.com>

Stephen Kloder <stephenk@cc.gatech.edu> writes:

> @_ is really @ARG, not @ARGV.

Hi, Stephen, you're right to the point to solve my problem. :-) Thanks

-- 
Tong (remove underscore(s) to reply)
  http://members.xoom.com/suntong001/
  - All free contribution & collection & music from the heavens


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

Date: 28 Jun 2000 06:14:57 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: Teen Volenteers WANTED
Message-Id: <slrn8ljl2t.ka1.abigail@alexandra.delanet.com>

Bart Lateur (bart.lateur@skynet.be) wrote on MMCDXCIII September MCMXCIII
in <URL:news:3959b688.258586@news.skynet.be>:
:} Abigail wrote:
:} 
:} >'' They're not languages in the same way red paint is not a language.
:} >'' They're markup.
:} >
:} >
:} >No, they are not markup, for the same reason Perl variables aren't
:} >the language.
:} >
:} >Hint: HTML and XML aren't just pretty tokens. The different letters
:} >actually stand for something. Including the L.
:} 
:} So does the "M".
:} 
:} The difference between a "markup language" and a "programming language"
:} is, mainly, the ability to create loops and conditionals in the latter.

I wasn't claiming that HTML or XML were programming languages, or anything
other than markup languages.

But markup language is a subclass of language. Markup doesn't invalidate
language.

:} You could consider WMF (Windows Meta File) as a language too: it
:} contains commands for the display to draw, lines, rectangles etc. But
:} it's data too, because it's only a literal list of what needs to be
:} painted. Because there can't be loops in a WMF, it's not a programming
:} language. IMO.

Them being a programming language wasn't the point being raised. Them
being a *language* was the point.

Stick to (sub)thread, please.


Abigail
-- 
BEGIN {my $x = "Knuth heals rare project\n";
       $^H {integer} = sub {my $y = shift; $_ = substr $x => $y & 0x1F, 1;
       $y > 32 ? uc : lc}; $^H = hex join "" => 2, 1, 1, 0, 0}
print 52,2,10,23,16,8,1,19,3,6,15,12,5,49,21,14,9,11,36,13,22,32,7,18,24;


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

Date: Wed, 28 Jun 2000 11:49:57 GMT
From: gevens@my-deja.com
Subject: Re: Teen Volenteers WANTED
Message-Id: <8jcop0$3ig$1@nnrp1.deja.com>

Yeah,

But are you a teenager though ?


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 28 Jun 2000 12:27:02 +0100
From: "John J. Lee" <phrxy@csv.warwick.ac.uk>
Subject: Re: Uninterpolated quoting and \
Message-Id: <Pine.SOL.4.21.0006281224040.8473-100000@mimosa.csv.warwick.ac.uk>

On Mon, 26 Jun 2000, Tad McClellan wrote:

> On Mon, 26 Jun 2000 13:46:24 +0100, John J. Lee <phrxy@csv.warwick.ac.uk> wrote:
> >
> >I don't understand why this doesn't work (note the single quotes):
> >
> >#!/usr/bin/perl -w
> >
> >use diagnostics
> >
> >$blah = 'e:\directory\';
> >print $blah;
[...]
> But don't forget the "other" files that came with your perl distribution
> (i.e. the non-FAQ *.pod files).
[...]
> "Scalar value constructors" section in perldata.pod:
[...]

Thanks all who answered, I get it now.  Maybe it should be in perlop too.


John



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

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 V9 Issue 3499
**************************************


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