[23317] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5537 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Sep 21 18:05:46 2003

Date: Sun, 21 Sep 2003 15:05:13 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 21 Sep 2003     Volume: 10 Number: 5537

Today's topics:
        "my" declarations, only matter of taste? <mpapec@yahoo.com>
    Re: "my" declarations, only matter of taste? <REMOVEsdnCAPS@comcast.net>
    Re: "my" declarations, only matter of taste? <trammell+usenet@hypersloth.invalid>
    Re: "my" declarations, only matter of taste? (Chris Richmond - MD6-FDC ~)
    Re: "my" declarations, only matter of taste? <tassilo.parseval@rwth-aachen.de>
    Re: "my" declarations, only matter of taste? <drumspoorly@reachone.net>
    Re: "my" declarations, only matter of taste? <bharnish@technologist.com>
        $_ not changing in a foreach <samj2@austarmetro.com.au>
    Re: $_ not changing in a foreach <samj2@austarmetro.com.au>
        () questions <mpapec@yahoo.com>
    Re: () questions <REMOVEsdnCAPS@comcast.net>
    Re: () questions <grazz@pobox.com>
    Re: () questions <krahnj@acm.org>
    Re: Appropriate File Permissions <ducott_99@yahoo.com>
    Re: Appropriate File Permissions <pilsl_usenet@goldfisch.at>
        D not deleting all breakpoints <samj2@austarmetro.com.au>
    Re: D not deleting all breakpoints <kevin@vaildc.net>
        How fast is seek? (David Morel)
    Re: How fast is seek? <bwaNOlSPtAMon@rochester.rr.com>
    Re: I know I can do this with a regex, but... <bdonlan@users.sf.net>
    Re: package problem? [was Re: @_ in subroutine corrupts <bdonlan@users.sf.net>
    Re: Sending html mail with inline images <mcbass@lightsphere.de>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 21 Sep 2003 17:58:07 +0200
From: Matija Papec <mpapec@yahoo.com>
Subject: "my" declarations, only matter of taste?
Message-Id: <bfhrmvgre842llne5rde01ouhmejpr3b2r@4ax.com>


a)
for (1..20) {
  my $mod = $_%3;
  ...
}

b)
my $mod;
for (1..20) {
  $mod = $_%3;
  ...
}

Let's say we'll need $mod only inside of foreach, so both cases work as
desired but is one more preferred then the other?


-- 
Matija


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

Date: Sun, 21 Sep 2003 11:23:29 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: "my" declarations, only matter of taste?
Message-Id: <Xns93FD7E031ACEEsdn.comcast@206.127.4.25>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

Matija Papec <mpapec@yahoo.com> wrote in 
news:bfhrmvgre842llne5rde01ouhmejpr3b2r@4ax.com:

> 
> a)
> for (1..20) {
>   my $mod = $_%3;
>   ...
> }
> 
> b)
> my $mod;
> for (1..20) {
>   $mod = $_%3;
>   ...
> }
> 
> Let's say we'll need $mod only inside of foreach, so both cases work as
> desired but is one more preferred then the other?
 
Case (a) limits the scope of $mod to the for loop block.  In general, it 
is good practice to limit the scope of variables as narrowly as possible, 
since you're less likely to use its value by mistake later.  Or, suppose 
you later add a variable $mod in an enclosing outer scope.  With case 
(a), you don't have to worry about stomping on the new variable's value.  
With case (b), you have two variables at the same scope that can 
conflict.

Case (a) creates a new lexical variable each time through the loop; this 
probably slows the loop down by some microseconds.  That's almost 
certainly inconsequential. 

Case (b) is generally preferred, since it can potentially save you 
headaches.

- -- 
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print

-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBP23Qb2PeouIeTNHoEQL7WwCgrG8x+qqOrhO/Bt5shN3aUSOX86cAn2Yh
Ayxw3vcjJrOJocI0wZv2wewZ
=rCf0
-----END PGP SIGNATURE-----


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

Date: Sun, 21 Sep 2003 16:21:26 +0000 (UTC)
From: "John J. Trammell" <trammell+usenet@hypersloth.invalid>
Subject: Re: "my" declarations, only matter of taste?
Message-Id: <slrnbmrk06.v7.trammell+usenet@hypersloth.el-swifto.com.invalid>

On Sun, 21 Sep 2003 17:58:07 +0200, Matija Papec <mpapec@yahoo.com> wrote:
> a)
> for (1..20) {
>   my $mod = $_%3;
>   ...
> }
> 
> b)
> my $mod;
> for (1..20) {
>   $mod = $_%3;
>   ...
> }
> 
> Let's say we'll need $mod only inside of foreach, so both cases work
> as desired but is one more preferred then the other?
> 

I would prefer method (b).  Why leave $mod hanging around
if you're done with it?



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

Date: Sun, 21 Sep 2003 19:03:16 +0000 (UTC)
From: crichmon@filc8533.fm.intel.com (Chris Richmond - MD6-FDC ~)
Subject: Re: "my" declarations, only matter of taste?
Message-Id: <bkkslk$s3b$1@news01.intel.com>

If 'my' is so great, why does it disable the 'used only once'
warning from perl -w?  I catch typos on a fairly regular basis
because I don't use 'my'.  I also package all my subroutines and
libraries and call things explicitly.  The environment I work
in has maybe 30 custom libraries.  I'd be lost if I couldn;t
tell which file an error came from.

Chris

-- 
 Chris Richmond         | I don't speak for Intel & vise versa    



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

Date: 21 Sep 2003 20:34:06 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: "my" declarations, only matter of taste?
Message-Id: <bkl1vu$pl3$1@nets3.rz.RWTH-Aachen.DE>

Also sprach Chris Richmond - MD6-FDC ~:

> If 'my' is so great, why does it disable the 'used only once'
> warning from perl -w?  I catch typos on a fairly regular basis
> because I don't use 'my'.  I also package all my subroutines and
> libraries and call things explicitly.  The environment I work
> in has maybe 30 custom libraries.  I'd be lost if I couldn;t
> tell which file an error came from.

Strictures will turn these warnings into a fatal error. Watch:

    ethan@ethan:~$ perl -w
    $variable = "foobar";
    print $varaible;
    __END__
    Name "main::varaible" used only once: possible typo at - line 2.
    Name "main::variable" used only once: possible typo at - line 1.
    Use of uninitialized value in print at - line 2.

Whereas with strictures:

    ethan@ethan:~$ perl -Mstrict
    my $variable = "foobar";
    print $varaible;
    __END__
    Global symbol "$varaible" requires explicit package name at - line
    Execution of - aborted due to compilation errors.

So I don't need this warning any longer. It would serve no purpose and
given that the lower code wont even compile, emitting an additional
warning would be rather pointless.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: Sun, 21 Sep 2003 13:49:54 -0700
From: Steve May <drumspoorly@reachone.net>
Subject: Re: "my" declarations, only matter of taste?
Message-Id: <vms31gnatp959e@corp.supernews.com>

Chris Richmond - MD6-FDC ~ wrote:
> If 'my' is so great, why does it disable the 'used only once'
> warning from perl -w?  I catch typos on a fairly regular basis
> because I don't use 'my'.  I also package all my subroutines and
> libraries and call things explicitly.  The environment I work
> in has maybe 30 custom libraries.  I'd be lost if I couldn;t
> tell which file an error came from.
> 
> Chris
> 

Ah... I would say you are setting yourself up for other
problems by refusing to use 'my'.

In my experience programs tend to be a whole lot more
portable if developed with warnings and use strict.

My $.02

You might think about building a little routine to take advantage of
the argument form of the function 'caller'.  I trap errors and feed
them to a caller trace routine I wrote that tells me exactly what
happened, where it happened and how it got there.

Pretty slick (I think) and makes debugging a whole lot easier.

Just a thought...

s.




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

Date: Sun, 21 Sep 2003 21:12:25 GMT
From: Brian Harnish <bharnish@technologist.com>
Subject: Re: "my" declarations, only matter of taste?
Message-Id: <pan.2003.09.21.21.12.55.607986@technologist.com>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

On Sun, 21 Sep 2003 17:58:07 +0200, Matija Papec wrote:

> 
> a)
> for (1..20) {
>   my $mod = $_%3;
>   ...
> }
> 
> b)
> my $mod;
> for (1..20) {
>   $mod = $_%3;
>   ...
> }
> 
> Let's say we'll need $mod only inside of foreach, so both cases work as
> desired but is one more preferred then the other?

Use case a.

Variables should be limited to the the smallest possible scope.

 - Brian
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/bhRViK/rA3tCpFYRAh3BAJ4w/S0nmJUCACZ9m4MYtkIUa28LgACg/kX4
1p8eOtpuITYTfWjux8bc4Cc=
=eB0T
-----END PGP SIGNATURE-----



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

Date: Sun, 21 Sep 2003 17:50:03 GMT
From: Sam <samj2@austarmetro.com.au>
Subject: $_ not changing in a foreach
Message-Id: <3F6DE69C.8030807@austarmetro.com.au>

Hello
	foreach (@calc) {
	  $total += $_;
	}
DB<70> p $_
is giving the same value for each loop of the code above. should itn't 
change its value to each item in the array @calc or I am missing somthing.

any idea or hints...thanks alot



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

Date: Sun, 21 Sep 2003 18:06:17 GMT
From: Sam <samj2@austarmetro.com.au>
Subject: Re: $_ not changing in a foreach
Message-Id: <3F6DEA6A.1010904@austarmetro.com.au>

Sam wrote:
> Hello
>     foreach (@calc) {
>       $total += $_;
>     }
> DB<70> p $_
> is giving the same value for each loop of the code above. should itn't 
> change its value to each item in the array @calc or I am missing somthing.
> 
> any idea or hints...thanks alot
> 

  I fixed it
it seams that in a previous line I had
   my @list = @{ shift(@_) };
   my $value = shift(@_);
so I changed that to
   my @list = @{ shift() };
   my $value = shift();
maybe the first case when I used @_ that set perl default variable $_ to 
  a fixed value but when I removed @_ that freed it again.
if I am not correct please correct me and explain why that had happend.

thanks



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

Date: Sun, 21 Sep 2003 17:58:06 +0200
From: Matija Papec <mpapec@yahoo.com>
Subject: () questions
Message-Id: <a5irmv8autq78mgo8vl9e0h0lc7din88ll@4ax.com>


1) () stands afaik for "empty list", so why it doesn't pass a map function?
Is such behavior accidental or intentional?

print join ',', map $_%2 ? () : $_, 1..20;


2) how to grok this expression, what exactly perl does here?

my $count = () = $data =~ /match/g;

is this /on the perl side/ same as,
my $count = @{[ $data =~ /match/g ]};

?


-- 
Matija


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

Date: Sun, 21 Sep 2003 11:19:20 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: () questions
Message-Id: <Xns93FD7D4ED835Asdn.comcast@206.127.4.25>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

Matija Papec <mpapec@yahoo.com> wrote in
news:a5irmv8autq78mgo8vl9e0h0lc7din88ll@4ax.com: 

> 
> 1) () stands afaik for "empty list", so why it doesn't pass a map
> function? Is such behavior accidental or intentional?
> 
> print join ',', map $_%2 ? () : $_, 1..20;

I do not understand what you mean by "pass a map function".  The above 
statement prints "2,4,6,8,10,12,14,16,18,20", which makes perfect sense 
to me.  What is puzzling you about it?


> 2) how to grok this expression, what exactly perl does here?
> 
> my $count = () = $data =~ /match/g;

This is a semi-cheesy way of getting a list context on the right side of 
the expression and a scalar context on the left side.  In a list context, 
m//g gives a list of all matching substrings.  The left side, $count, is 
in scalar context, which yields the number of substrings.

 
> is this /on the perl side/ same as,
> my $count = @{[ $data =~ /match/g ]};

Effectively, yes, although imho the former syntax is easier to 
understand.

- -- 
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print

-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBP23Pd2PeouIeTNHoEQJhAgCgzevmNG1kxbe75DZcfCuyYbZBkEgAoJ87
JK9Sr0ShjX0dAsB1BgIF6iyd
=dmfV
-----END PGP SIGNATURE-----


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

Date: Sun, 21 Sep 2003 19:08:55 GMT
From: Steve Grazzini <grazz@pobox.com>
Subject: Re: () questions
Message-Id: <bHmbb.9968$Uv2.246@nwrdny02.gnilink.net>

Matija Papec <mpapec@yahoo.com> wrote:
> 1) () stands afaik for "empty list", so why it doesn't pass
> a map function?  Is such behavior accidental or intentional?
> 
> print join ',', map $_%2 ? () : $_, 1..20;

This *is* an empty list.  The map() expression returns an empty
list for the odd members of the input, kind of like grep().

  print join ',', grep { not $_ % 2 } 1..20;

> 2) how to grok this expression, what exactly perl does here?
> 
> my $count = () = $data =~ /match/g;
> 
> is this /on the perl side/ same as,
> my $count = @{[ $data =~ /match/g ]};

No -- there's no array.  This is list assignment in scalar
context, as documented in perlop.

    Similarly, a list assignment in list context produces the
    list of lvalues assigned to, and a list assignment in
    scalar context returns the number of elements produced 
    by the expression on the right hand side of the assignment.

So the result is the same, but for a different reason.

-- 
Steve



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

Date: Sun, 21 Sep 2003 19:37:23 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: () questions
Message-Id: <3F6DFDE4.8393134F@acm.org>

Matija Papec wrote:
> 
> 1) () stands afaik for "empty list", so why it doesn't pass a map function?
> Is such behavior accidental or intentional?
> 
> print join ',', map $_%2 ? () : $_, 1..20;

$ perl -le'print join ",", map $_%2 ? () : $_, 1..20;'
2,4,6,8,10,12,14,16,18,20

It works fine here.  What problems are you having?


> 2) how to grok this expression, what exactly perl does here?
> 
> my $count = () = $data =~ /match/g;
> 
> is this /on the perl side/ same as,
> my $count = @{[ $data =~ /match/g ]};

The first one uses a list to get the count and the second one uses an
array.  I would assume, but I don't know for sure, that populating and
dereferencing an array would be less efficient then using a list.


John
-- 
use Perl;
program
fulfillment


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

Date: Sun, 21 Sep 2003 20:25:08 GMT
From: "Robert TV" <ducott_99@yahoo.com>
Subject: Re: Appropriate File Permissions
Message-Id: <EOnbb.1009926$3C2.22525050@news3.calgary.shaw.ca>

"Tad McClellan" <tadmc@augustmail.com> wrote:
> > Several of my scripts read and write data to text files located the
cgi-bin
> > or my server. I'm curious as to the correct file permissions I should be
> > using. No outside sources access the text file data, only the perl
scripts
> > in thier directory. I have been using 755 for all my perl scripts and
777
> > for all text files that get read and written to. I ask these questions
for
> > security purposes, as some of the text files contain sensitive data.
Should
> > I be using 755 for perl scripts and 777 for the text files? Thanx!
>
>
> What is your Perl question?

??? Two inquiries in my original post:

- I'm curious as to the correct file permissions I should be using.
- Should I be using 755 for perl scripts and 777 for the text files?

RTV




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

Date: Sun, 21 Sep 2003 22:36:00 +0200
From: peter pilsl <pilsl_usenet@goldfisch.at>
Subject: Re: Appropriate File Permissions
Message-Id: <3f6e0c71$1@e-post.inode.at>

Robert TV wrote:

> 
> ??? Two inquiries in my original post:
> 
> - I'm curious as to the correct file permissions I should be using.
> - Should I be using 755 for perl scripts and 777 for the text files?
> 

Maybe Tad wanted to tell you that none of these question actually had to do 
with perl ? 

just a guess :)

peter

-- 
peter pilsl
pilsl_usenet@goldfisch.at
http://www.goldfisch.at



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

Date: Sun, 21 Sep 2003 17:15:40 GMT
From: Sam <samj2@austarmetro.com.au>
Subject: D not deleting all breakpoints
Message-Id: <3F6DDE8B.50602@austarmetro.com.au>

Hello
DB<45>D
DB<45>L
still lists the 3 breakpoints I have had and the code stops at them.
how can I delete all breakpoint. it seams the D switch is not working.

thanks



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

Date: Sun, 21 Sep 2003 16:00:51 -0400
From: Kevin Michael Vail <kevin@vaildc.net>
Subject: Re: D not deleting all breakpoints
Message-Id: <kevin-288B91.16005121092003@news101.his.com>

In article <3F6DDE8B.50602@austarmetro.com.au>,
 Sam <samj2@austarmetro.com.au> wrote:

> Hello
> DB<45>D
> DB<45>L
> still lists the 3 breakpoints I have had and the code stops at them.
> how can I delete all breakpoint. it seams the D switch is not working.

What version of Perl are you working with?  This changed (along with 
some other things) in 5.8.0.
-- 
Kevin Michael Vail | Dogbert: That's circular reasoning.
kevin@vaildc.net   | Dilbert: I prefer to think of it as no loose ends.
http://www.vaildc.net/kevin/


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

Date: 21 Sep 2003 12:08:55 -0700
From: altalingua@hotmail.com (David Morel)
Subject: How fast is seek?
Message-Id: <60c4a7b1.0309211108.7034f6a7@posting.google.com>

seek FILEHANDLE,POSITION,WHENCE

How fast is seek?

I am using the seek function on some large files, for simplicity. Are
there any benchmarks on the speed of this function (WHENCE = 0)?


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

Date: Sun, 21 Sep 2003 19:48:01 GMT
From: Bob Walton <bwaNOlSPtAMon@rochester.rr.com>
Subject: Re: How fast is seek?
Message-Id: <3F6E0061.5090605@rochester.rr.com>

David Morel wrote:

> seek FILEHANDLE,POSITION,WHENCE
> 
> How fast is seek?
> 
> I am using the seek function on some large files, for simplicity. Are
> there any benchmarks on the speed of this function (WHENCE = 0)?
> 

That varies tremdously with your hardware platform and OS.  Why don't 
you use Benchmark; on your system and find out for yourself?

-- 
Bob Walton



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

Date: Sun, 21 Sep 2003 14:54:15 -0400
From: bd <bdonlan@users.sf.net>
Subject: Re: I know I can do this with a regex, but...
Message-Id: <pn8141-91u.ln1@bd-home-comp.no-ip.org>

Tman wrote:

> Need to strip comments from VBScript code.
> 
> Tried to use a state machine to tell if I was in quotes, but got very
> confused.  I know I can use a regex, although I may have to call it
> repeatedly to eat quoted strings.  Anyone have ideas?
> 
> I need to whack everything after the first comment character...
> 
> this is not a comment
> 'this line is fully commented
> the comment 'in this line starts after ' the word comment
> there "is no 'comment" in this line
> but in "this 'line" there 'is a "comment" before the word "is"
> 'this line is "fully" commented
> 
> ad infinitum...

How about:
sub stripcomment ($) {
  my $str = shift @_;
  my @chars = split '', $str;
  my @out;
  my $inquote = 0;
  for(@chars){
    if($_ eq "'" && !$inquote){
      last;
    }
    if($_ eq '"'){
      $inquote = !$inquote;
    }
    push @out, $_;
  }
  return join '', @out;
}
    
-- 
Before marriage the three little words are "I love you," after marriage
they are "Let's eat out."



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

Date: Sun, 21 Sep 2003 14:44:36 -0400
From: bd <bdonlan@users.sf.net>
Subject: Re: package problem? [was Re: @_ in subroutine corrupts data?]
Message-Id: <k58141-88t.ln1@bd-home-comp.no-ip.org>

synthespian wrote:

> While we're on this, it got weird with "strict" and "warnings". Why?
> 
> 
> @arrayb = subthat(1, 2, 3, 4);

Strict requires most variables to be explicitly declared (perlvar has the
exceptions). Try:
my @arrayb = subthat(1, 2, 3, 4);

> 
> sub subthat {
>      @arrayb = @_;

And my @arrayb = @_; here, so as not to corrupt the other @arrayb

>      foreach (@arrayb) {
>          print "$_\n";
>      }
> }
> 
> print "Finished\n";
> 
> $ perl subrout3.pl
> Global symbol "@arrayb" requires explicit package name at subrout3.pl
> line 5.
> Global symbol "@arrayb" requires explicit package name at subrout3.pl
> line 9.
> Global symbol "@arrayb" requires explicit package name at subrout3.pl
> line 10.
> Execution of subrout3.pl aborted due to compilation errors.
> 
> TIA
>   Henry

-- 
In these matters the only certainty is that there is nothing certain.
                -- Pliny the Elder



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

Date: Sun, 21 Sep 2003 23:17:57 +0200
From: "Sebastian Scholz" <mcbass@lightsphere.de>
Subject: Re: Sending html mail with inline images
Message-Id: <bkl4i7$dem$1@newsreader2.netcologne.de>

Thanks, but MIME::Lite does not seem to be enable me to login onto the smtp
server as I can with Mail::Sender ..... or am I wrong ?

Sebastian



"zentara" <zentara@highstream.net> schrieb im Newsbeitrag
news:5bdrmvoppcr864t1f3f5edfjc8pl7docrg@4ax.com...
> On Sat, 20 Sep 2003 20:50:28 +0200, "Sebastian Scholz"
> <mcbass@lightsphere.de> wrote:
>
> >Hi
> >
> > I wrote a small script to send a html mail with inline images using
> >mail:sender. Sending html mails without the images works fine, but when I
> >try to have the images sent with the mail I only get the html and the
image
> >attached to the mail. I used the example for the mail:sender module but
that
> >did not work. Here is my code snippet :
>
> To have the image shown inline, you need to use the ID tag and cid: tag
> as demonstrated in the script below. You probably can work them into
> your code.
>
> #!/usr/bin/perl
> use MIME::Lite;                 # Standard CPAN module
> my $from_address = 'selector@selectorweb.com';
> my $to_address = 'selector@selectorweb.com';
>
> my $subject = 'MIME test - HTML with image';
> my $mime_type = 'multipart/related';
>
> # Create the message headers
> my $mime_msg = MIME::Lite->new(
>    From => $from_address,
>    To   => $to_address,
>    Subject => $subject,
>    Type => $mime_type
>    )
>   or die "Error creating MIME body: $!\n";
>
> # Attach the HTML content
> my $message_body = '<html><body><H3>Hello world!
>    <img src="cid:myid.gif"></H3></body></html>';
>
> $mime_msg->attach(Type => 'text/html',
>                   Data => $message_body);
>
> # Attach the image
> $mime_msg->attach(
>    Type => 'image/gif',
>    Id => 'myid.gif',
>    Encoding => 'base64',
>    Path => 'pikachu.jpg');
>
> $mime_msg->send;
>
> __END__
>
>
> Our body's 20 milligrams of beta radioactive Potassium 40
> emit about 340 million neutrinos per day, which go at
> lightspeed to the ends of the universe!..even thru the earth.




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

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.  

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


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