[16150] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3562 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 10 16:17:53 2000

Date: Mon, 10 Jul 2000 13:17:39 -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: <963260259-v9-i3562@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 10 Jul 2000     Volume: 9 Number: 3562

Today's topics:
        Dereferencing references to arrays <jimidogNOjiSPAM@mailcity.com.invalid>
    Re: Dereferencing references to arrays <uri@sysarch.com>
    Re: Dereferencing references to arrays <jimidogNOjiSPAM@mailcity.com.invalid>
        Developing large Perl programs <ralawrence@my-deja.com>
    Re: Developing large Perl programs <SCook@pobox.com>
    Re: Developing large Perl programs (Tad McClellan)
        Development system for KDE or X11? <mmue@gmx.net>
    Re: Development system for KDE or X11? <gellyfish@gellyfish.com>
    Re: Diff files THX BOB! <gpitman@nb.net>
        Diff files <gpitman@nb.net>
    Re: Diff files <bwalton@rochester.rr.com>
        difference between online and offline eastking@my-deja.com
        difference between online and offline eastking@my-deja.com
        directing mail to program <trbovidd@mcmaster.ca>
    Re: directing mail to program (Rafael Garcia-Suarez)
        does UNIX Perl have some setgid? hacktic@my-deja.com
    Re: does UNIX Perl have some setgid? (David Efflandt)
    Re: does UNIX Perl have some setgid? <news@fido.workone.com>
    Re: does UNIX Perl have some setgid? (Villy Kruse)
        Email Attachments in Perl (no modules) joekind@my-deja.com
    Re: Email Attachments in Perl (no modules) <peter.sundstrom@eds.com>
    Re: Email Attachments in Perl (no modules) <andre@UltraShell.Net>
    Re: Email Attachments in Perl (no modules) <gellyfish@gellyfish.com>
    Re: Email Attachments in Perl (no modules) (Villy Kruse)
    Re: Email Attachments in Perl (no modules) joekind@my-deja.com
    Re: Email Attachments in Perl (no modules) <peter.sundstrom@eds.com>
    Re: Email Attachments in Perl (no modules) eryq@zeegee.com
        Embed JavaScript in Perl possible? <minwNOmiSPAM@selectpub.com.invalid>
    Re: Embed JavaScript in Perl possible? <care227@attglobal.net>
        embedded perl problem: modification of read-only value  <bnewbill@micron.com>
        embedding multiple interpreter instances <thomas.lambert@ndsatcom.de>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 07 Jul 2000 19:06:12 -0700
From: jimidog <jimidogNOjiSPAM@mailcity.com.invalid>
Subject: Dereferencing references to arrays
Message-Id: <14f7cb54.ce754b26@usw-ex0105-037.remarq.com>

Here's a question about the use of references in perl, and it
boils down to this:  why is the syntax for dereferencing a
reference in a list of lists more constricted than for
dereferencing a reference to an ordinary one-dimensional array?

As I understand it, a list of lists @LoL (an array of @arrays) is
a list of hard references to anonymous arrays, constructed, for
example, as

	@LoL = (
		[ "fred", "barney" ],
		[ "george", "jane", "elroy" ],
		[ "homer", "marge", "bart" ],
	);


If you print them out
	foreach $aref (@LoL) {
		print $aref, "\t";
	}

you get someting like ARRAY(0x876f160) ARRAY(0x876f220)
ARRAY(0x8765144)	

Now, assume a reference to a one-dimensional array
	$aref = \@somearray;

if you print this out it returns something like ARRAY(0x8761d00)

To dereference it, you can use
	push @$aref, $item;

or
	push @{$aref}, $item;

but to dereference a reference in an @LoL member (i.e. something
with a subscript) you __have__ to use BLOCK as a variable name,
i.e.
	push @ { $LoL[0] }, $item;

The statement
	push @$LoL[0], $item;

doesn't work which is strange since both $aref and $LoL[0] appear
to contain exactly the same kind of reference.  Why is this so?

-- Jim Mauldin




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

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com



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

Date: Sat, 08 Jul 2000 02:21:34 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Dereferencing references to arrays
Message-Id: <x7aeftpdjl.fsf@home.sysarch.com>

>>>>> "j" == jimidog  <jimidogNOjiSPAM@mailcity.com.invalid> writes:

  j> but to dereference a reference in an @LoL member (i.e. something
  j> with a subscript) you __have__ to use BLOCK as a variable name,
  j> i.e.
  j> 	push @ { $LoL[0] }, $item;

  j> The statement
  j> 	push @$LoL[0], $item;

  j> doesn't work which is strange since both $aref and $LoL[0] appear
  j> to contain exactly the same kind of reference.  Why is this so?

in a single word, precedence. the @ binds tighter to $LoL than the [0]
does, which is not correct. the braces force the deref to work on the
element in @LoL and not some non-existant scalar $LoL.

nice to have a decent question here for a change. :-)

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Fri, 07 Jul 2000 19:50:12 -0700
From: jimidog <jimidogNOjiSPAM@mailcity.com.invalid>
Subject: Re: Dereferencing references to arrays
Message-Id: <200c54cd.d9eff455@usw-ex0105-037.remarq.com>

Uri Guttman <uri@sysarch.com> wrote:
>
>in a single word, precedence. the @ binds tighter to $LoL than
the [0] does, which is not correct. the braces force the deref to
work on the element in @LoL and not some non-existant scalar
$LoL.
>


All right!  Thanks.  Getting there (slowly) ...

-- Jim


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

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com



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

Date: Mon, 10 Jul 2000 09:17:09 GMT
From: Richard Lawrence <ralawrence@my-deja.com>
Subject: Developing large Perl programs
Message-Id: <8kc4ac$9ja$1@nnrp1.deja.com>

Hi,

I have to admit when it comes to developing large applications I'm used
to C. But I thought I'd take the plunge and have a go with Perl, but
I'm a little unsure about the way to go about it.

In C, I'd create several .c files and have a makefile which would
compile each file into the object file and then link them all together
to make the executable.

Of course, you can't really take this approach with perl. So how on
earth do I go about breaking down my code into sepearate files? I
thought about having one main file that links to all the others
with "do" but even to a relative perl newbie like myself this seems to
be a fairly horrible way of doing things.

Can someone please tell me how I can break my code into smaller files
and combine them correctly?

Thanks

Rich


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


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

Date: Mon, 10 Jul 2000 11:14:44 GMT
From: "steve" <SCook@pobox.com>
Subject: Re: Developing large Perl programs
Message-Id: <Eeia5.12683$Tb7.85828@news-server.bigpond.net.au>

Create .pm library files for each subsection and use then into your main
code.  Just like using libraries in C.


"Richard Lawrence" <ralawrence@my-deja.com> wrote in message
news:8kc4ac$9ja$1@nnrp1.deja.com...
> Hi,
>
> I have to admit when it comes to developing large applications I'm used
> to C. But I thought I'd take the plunge and have a go with Perl, but
> I'm a little unsure about the way to go about it.
>
> In C, I'd create several .c files and have a makefile which would
> compile each file into the object file and then link them all together
> to make the executable.
>
> Of course, you can't really take this approach with perl. So how on
> earth do I go about breaking down my code into sepearate files? I
> thought about having one main file that links to all the others
> with "do" but even to a relative perl newbie like myself this seems to
> be a fairly horrible way of doing things.
>
> Can someone please tell me how I can break my code into smaller files
> and combine them correctly?
>
> Thanks
>
> Rich
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.




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

Date: Mon, 10 Jul 2000 08:25:49 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Developing large Perl programs
Message-Id: <slrn8mjg6d.tf8.tadmc@magna.metronet.com>

On Mon, 10 Jul 2000 09:17:09 GMT, Richard Lawrence <ralawrence@my-deja.com> wrote:

>So how on
>earth do I go about breaking down my code into sepearate files?

>Can someone please tell me how I can break my code into smaller files
>and combine them correctly?


Use modules:


   perldoc perlmod


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Wed, 05 Jul 2000 13:26:03 +0200
From: Matthias Mueller <mmue@gmx.net>
Subject: Development system for KDE or X11?
Message-Id: <39631B4B.E4AB9FAF@gmx.net>

Hello,
does anyone knows if there is a IDE for perlscripting on solaris or unix
systems with KDE, CDE or OpenWindows available?
I could find some for Win95/98/NT but nothing for unix yet.
Thank you for any hints.
Regards
Matthias



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

Date: Wed, 05 Jul 2000 14:42:39 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Development system for KDE or X11?
Message-Id: <zPH85.1395$iP2.129745@news.dircon.co.uk>

On Wed, 05 Jul 2000 13:26:03 +0200, Matthias Mueller Wrote:
> Hello,
> does anyone knows if there is a IDE for perlscripting on solaris or unix
> systems with KDE, CDE or OpenWindows available?

Hehehehe, Er no, dont you know the OS is IDE ;-? If you are wanting something
that will help you make GUI stuff and you can install Gnome then you might
try Glade which has a Perl plugin ....


/J\


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

Date: Wed, 05 Jul 2000 17:07:19 -0400
From: Gary Pitman <gpitman@nb.net>
Subject: Re: Diff files THX BOB!
Message-Id: <3963A388.83A5E85B@nb.net>

Thanx Bob, thats it! boy do i feel like an idiot! (no comentary required)

You don't have $newfile open in Perl for
writing or anything like that at the time diff is called, do you?
--
Bob Walton



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

Date: Wed, 05 Jul 2000 13:00:49 -0400
From: Gary Pitman <gpitman@nb.net>
Subject: Diff files
Message-Id: <396369C4.EEB301D7@nb.net>

My script contains this line:
print DIFF `diff $newfile $oldfile`;
it prints the entire contents of $oldfile to the DIFF filehandle.
If i run the command at the prompt i get the output i was looking for
(the lines that differ in the 2 files). If i swap the order of the files
to be diff'ed it makes no difference.
My logic appears to be flawed,help would be appreciated.



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

Date: Wed, 05 Jul 2000 20:54:15 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Diff files
Message-Id: <3963A0CF.5E34BEB9@rochester.rr.com>

Gary Pitman wrote:
> 
> My script contains this line:
> print DIFF `diff $newfile $oldfile`;
> it prints the entire contents of $oldfile to the DIFF filehandle.
> If i run the command at the prompt i get the output i was looking for
> (the lines that differ in the 2 files). If i swap the order of the files
> to be diff'ed it makes no difference.
> My logic appears to be flawed,help would be appreciated.
Probably the Perl variable $newfile does not contain the correct file
name. Use the debugger (-d switch) to see what is there.  What you have
should be OK otherwise.  You don't have $newfile open in Perl for
writing or anything like that at the time diff is called, do you?
-- 
Bob Walton


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

Date: Mon, 03 Jul 2000 15:02:10 GMT
From: eastking@my-deja.com
Subject: difference between online and offline
Message-Id: <8jq9t8$kbj$1@nnrp1.deja.com>

Hi ,every one here.

I have written a pm file and two pl script as following

commonuse.pl

	sub test(){
		# so sth here
	}
	1;

Init.pm

	package Init;

	require "commonuse.pl";

	sub new(){
		#do bless and others to $self
		test();
		my $query = CGI->new();
		self->{"CGI"} = $query;
	}
	1;


testscript.pl

	use Init;
	do "commonuse.pl";

	my $Init = Init->new();
	my $query = $Init->{"CGI"};


when I run testscript.pl offline, it worked well, but when I run it
online, it seemed that I can not get a CGI handle.I do not know why it
was so. Please help me .Thanks in advance.





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


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

Date: Mon, 03 Jul 2000 15:07:52 GMT
From: eastking@my-deja.com
Subject: difference between online and offline
Message-Id: <8jqa7r$kmh$1@nnrp1.deja.com>

Hi ,every one here.

I have written a pm file and two pl script as following

commonuse.pl

	sub test(){
		# so sth here
	}
	1;

Init.pm

	package Init;

	require "commonuse.pl";

	sub new(){
		#do bless and others to $self
		test();
		my $query = CGI->new();
		self->{"CGI"} = $query;
	}
	1;


testscript.pl

	use Init;
	do "commonuse.pl";

	my $Init = Init->new();
	my $query = $Init->{"CGI"};


when I run testscript.pl offline, it worked well, but when I run it
online, it seemed that I can not get a CGI handle.I do not know why it
was so. Please help me .Thanks in advance.





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


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

Date: Thu, 6 Jul 2000 20:45:12 -0400
From: "Giddy" <trbovidd@mcmaster.ca>
Subject: directing mail to program
Message-Id: <8k39h9$2nj$1@informer1.cis.McMaster.CA>

Hi everyone,

I have been trying to get a program going which uses unix' ".forward"
feature to forward mail to a program.  I have a small program now (in perl)
which is to eventually parse through a mail message and it's headers.  In
essence, my own mini version of procmail.  I have it sitting in my user
account on red hat 6.2.  I tried to send a test message in and got an error
saying :

 Address ....... is unsafe for mailing to programs

I search the net for this error, and saw references to "smrsh" files (which
when I searched my system I have several of these)  Could someone fill me in
on what is wrong? how do you make it "safe for programs".

Your time and assistance is tremendously appreciated and I look forward to
your reply,






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

Date: Fri, 07 Jul 2000 07:10:06 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: directing mail to program
Message-Id: <slrn8mb0qt.b7v.rgarciasuarez@rafael.kazibao.net>

Giddy wrote in comp.lang.perl.misc:
>Hi everyone,
>
>I have been trying to get a program going which uses unix' ".forward"
>feature to forward mail to a program.  I have a small program now (in perl)
>which is to eventually parse through a mail message and it's headers.  In
>essence, my own mini version of procmail.  I have it sitting in my user
>account on red hat 6.2.  I tried to send a test message in and got an error
>saying :
>
> Address ....... is unsafe for mailing to programs
>
>I search the net for this error, and saw references to "smrsh" files (which
>when I searched my system I have several of these)  Could someone fill me in
>on what is wrong? how do you make it "safe for programs".

smrsh is the SendMail Restricted SHell. Basically it restricts the mail filters
to a small set of programs, typically placed in /etc/smrsh. Look it up in the
sendmail documentation (probably under /usr/doc/sendmail). And this is not
a perl question...

-- 
Rafael Garcia-Suarez


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

Date: Mon, 10 Jul 2000 08:49:51 GMT
From: hacktic@my-deja.com
Subject: does UNIX Perl have some setgid?
Message-Id: <8kc2nc$8f7$1@nnrp1.deja.com>

Hi all,

How can I give a Perl script permission to write a file to the disk in
UNIX ? The script is executed by a webuser and not the owner of the
directory.
Can this be done in Perl ? I know I can have this done in some compiled
program, but due to other constrains I have to use Perl.

I been looking around, but lot of posts lead to a non-perl question on
this or a solution to make a compiled CGI program.

Regards;
-Mark-




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


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

Date: 10 Jul 2000 11:41:26 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: does UNIX Perl have some setgid?
Message-Id: <slrn8mjdip.us1.efflandt@efflandt.xnet.com>

On Mon, 10 Jul 2000, hacktic@my-deja.com <hacktic@my-deja.com> wrote:
>
>How can I give a Perl script permission to write a file to the disk in
>UNIX ? The script is executed by a webuser and not the owner of the
>directory.
>Can this be done in Perl ? I know I can have this done in some compiled
>program, but due to other constrains I have to use Perl.
>
>I been looking around, but lot of posts lead to a non-perl question on
>this or a solution to make a compiled CGI program.

The problem is that most Unix systems only honor suid or sgid for binaries
and not scripts (for security reasons).  Compiling a Perl script as a
binary is one option, but the file size will grow and it is limited to
that OS. The old perl4 "Learning perl" O'Reilly book had a perl generated
suid C wrapper example (the current "Learning Perl" does not).

Your best bet is to convince your server admin to run the apache suexec
option or cgiwrap so CGI runs as you.  Otherwise you are limited to
writing to insecure 666 permission to write to existing files or 777 dir
permission to create files (or possibly 606 and 707 respectively) which
anybody else can modify.

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/



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

Date: Mon, 10 Jul 2000 14:02:34 +0200
From: Kirill Miazine <news@fido.workone.com>
Subject: Re: does UNIX Perl have some setgid?
Message-Id: <Pine.LNX.4.21.0007101400230.25054-100000@gilda.uio.no>

Hello,

Run `chmod +s script.pl' from the command line, this will make the script
setuid and setgid which means that it will run under your user/group id.
Don't forget to chmod after you modify the sctipt :)

Helped?



On Mon, 10 Jul 2000 hacktic@my-deja.com wrote:

# Hi all,
# 
# How can I give a Perl script permission to write a file to the disk in
# UNIX ? The script is executed by a webuser and not the owner of the
# directory.
# Can this be done in Perl ? I know I can have this done in some compiled
# program, but due to other constrains I have to use Perl.
# 
# I been looking around, but lot of posts lead to a non-perl question on
# this or a solution to make a compiled CGI program.
# 
# Regards;
# -Mark-
# 
# 
# 
# 
# Sent via Deja.com http://www.deja.com/
# Before you buy.
# 



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

Date: 10 Jul 2000 13:27:54 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: does UNIX Perl have some setgid?
Message-Id: <slrn8mjjpc.15i.vek@pharmnl.ohout.pharmapartners.nl>

On Mon, 10 Jul 2000 14:02:34 +0200,
           Kirill Miazine <news@fido.workone.com> wrote:


>Hello,
>
>Run `chmod +s script.pl' from the command line, this will make the script
>setuid and setgid which means that it will run under your user/group id.
>Don't forget to chmod after you modify the sctipt :)
>
>Helped?
>



This works because the perl interpreter can check the suid bit of the
script and invoke suidperl which is already suid to root.  The suidperl
program then have the required privileges to set uid to any value
before running the script.  This works even if the kernel ignores
suid bits on script files in general.



Villy


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

Date: Wed, 05 Jul 2000 01:30:49 GMT
From: joekind@my-deja.com
Subject: Email Attachments in Perl (no modules)
Message-Id: <8ju34b$gfq$1@nnrp2.deja.com>

Hi, I was wondering how to send an email message
with an attached zip file.  I don't want to use
MIME::Lite or any other module, I just want to
use straight perl code.  Can anyone help me?


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


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

Date: Wed, 5 Jul 2000 14:49:41 +1200
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Email Attachments in Perl (no modules)
Message-Id: <8ju7qp$emq$1@hermes.nz.eds.com>


joekind@my-deja.com wrote in message <8ju34b$gfq$1@nnrp2.deja.com>...
>Hi, I was wondering how to send an email message
>with an attached zip file.  I don't want to use
>MIME::Lite or any other module, I just want to
>use straight perl code.  Can anyone help me?


Do you have a good reason why you can't use a tried and tested module that
will quickly and easily do the job?




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

Date: Wed, 05 Jul 2000 10:04:18 GMT
From: Andre van Straaten <andre@UltraShell.Net>
Subject: Re: Email Attachments in Perl (no modules)
Message-Id: <CKD85.3522$J41.10742@east3.usenetserver.com>

I have the same consideration as the other poster before, but maybe you
have to install the additional packages.

If you are allowed to, it's really easy to install the packages in your
own directory independently from the main Perl installation.
On my Web site http://www.vanstraatensoft.com is a short explanation
together with a MIME::Lite example using the own library. Go 
"scripting" and then "mail".

If you insist on the "raw" solution, I'm not aware of any straight Perl
code, but on Unix you can use a shell command like:
"mail -s "subject" addressee@destination.net < your_zip_file"
from inside your Perl script.

-- avs

joekind@my-deja.com wrote:
> Hi, I was wondering how to send an email message
> with an attached zip file.  I don't want to use
> MIME::Lite or any other module, I just want to
> use straight perl code.  Can anyone help me?


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

-- 

Andre van Straaten
http://www.vanstraatensoft.com
______________________________________________
flames please to /dev/null@vanstraatensoft.com





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

Date: Wed, 05 Jul 2000 10:07:12 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Email Attachments in Perl (no modules)
Message-Id: <kND85.1363$iP2.128053@news.dircon.co.uk>

On Wed, 05 Jul 2000 01:30:49 GMT, joekind@my-deja.com Wrote:
> Hi, I was wondering how to send an email message
> with an attached zip file.  I don't want to use
> MIME::Lite or any other module, I just want to
> use straight perl code.  Can anyone help me?
> 

Then you will want to read the MIME specification - that will be
rfc2045, rfc2046,rfc2047,rfc2048 and rfc2049 which can be found via
<http://www.rfc-editor.org> ...

It is simply a matter of correctly encoding the content and then supplying
the appropriate headers to the mail .

/J\


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

Date: 5 Jul 2000 11:42:24 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: Email Attachments in Perl (no modules)
Message-Id: <slrn8m67p0.hfu.vek@pharmnl.ohout.pharmapartners.nl>

On Wed, 05 Jul 2000 10:04:18 GMT,
          Andre van Straaten <andre@UltraShell.Net> wrote:


>
>If you insist on the "raw" solution, I'm not aware of any straight Perl
>code, but on Unix you can use a shell command like:
>"mail -s "subject" addressee@destination.net < your_zip_file"
>from inside your Perl script.
>



Chances are very high that the zip file won't be readable at the other end.
That is why you need to MIME encode, or in an emergency uuencode, any
binary file you send via e-mail.



Villy


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

Date: Wed, 05 Jul 2000 22:43:03 GMT
From: joekind@my-deja.com
Subject: Re: Email Attachments in Perl (no modules)
Message-Id: <8k0dll$u59$1@nnrp1.deja.com>

I can't access my perl directory and I have no clue as to install the
module.

In article <8ju7qp$emq$1@hermes.nz.eds.com>,
  "Peter Sundstrom" <peter.sundstrom@eds.com> wrote:
>
> joekind@my-deja.com wrote in message <8ju34b$gfq$1@nnrp2.deja.com>...
> >Hi, I was wondering how to send an email message
> >with an attached zip file.  I don't want to use
> >MIME::Lite or any other module, I just want to
> >use straight perl code.  Can anyone help me?
>
> Do you have a good reason why you can't use a tried and tested module
that
> will quickly and easily do the job?
>
>


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


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

Date: Thu, 6 Jul 2000 13:25:50 +1200
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Email Attachments in Perl (no modules)
Message-Id: <8k0n9e$ojl$1@hermes.nz.eds.com>


joekind@my-deja.com wrote in message <8k0dll$u59$1@nnrp1.deja.com>...
>> >Hi, I was wondering how to send an email message
>> >with an attached zip file.  I don't want to use
>> >MIME::Lite or any other module, I just want to
>> >use straight perl code.  Can anyone help me?
>>
>> Do you have a good reason why you can't use a tried and tested module
>>that will quickly and easily do the job?

>I can't access my perl directory and I have no clue as to install the
>module.

The module consists of one file which you can place anywhere you like.  It's
not difficult and the Perl FAQ covers using local modules.







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

Date: Fri, 07 Jul 2000 16:47:46 GMT
From: eryq@zeegee.com
To: joekind@my-deja.com
Subject: Re: Email Attachments in Perl (no modules)
Message-Id: <8k51je$ssa$1@nnrp1.deja.com>

I have placed directions for you on the MIME::Lite homepage:

http://www.zeegee.com/code/perl/MIME-Lite


In article <8k0dll$u59$1@nnrp1.deja.com>,
  joekind@my-deja.com wrote:
> I can't access my perl directory and I have no clue as to install the
> module.


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


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

Date: Wed, 05 Jul 2000 14:13:56 -0700
From: Catherine <minwNOmiSPAM@selectpub.com.invalid>
Subject: Embed JavaScript in Perl possible?
Message-Id: <1a014600.efa7b57b@usw-ex0106-048.remarq.com>

I am given a project to transform a program written in JavaScript to
Perl. My question is: is it possible for me to embed JavaScript in Perl
without recoding in Perl?




* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: Thu, 06 Jul 2000 10:24:59 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Embed JavaScript in Perl possible?
Message-Id: <396496BB.1FB50368@attglobal.net>

Catherine wrote:
> 
> I am given a project to transform a program written in JavaScript to
> Perl. My question is: is it possible for me to embed JavaScript in Perl
> without recoding in Perl?

Is this homework?  

The answer is yes, but not specifically in the way you might be 
thinking.  How to do it is left to the reader.  (But if this isn't
homework and is a work project, I'd keep in mind that whomever 
asked you to do this probably had a reason to get rid of Javascript.
Using Perl to display javascript is as foolish as using, say, PHP
to display Javascript.)


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

Date: Fri, 7 Jul 2000 11:26:50 -0600
From: "Brian Newbill" <bnewbill@micron.com>
Subject: embedded perl problem: modification of read-only value attempted...
Message-Id: <8k53qq$nmi$1@admin-srv3.micron.com>

I am catching the following error with SvPV(GvSV(errgv)) after (while)
calling sv_setpv(...) :

Modification of a read-only value attempted at (eval 3) line 40

The routine containing the sv_setpv(...) works fine except when
called from an xs layer which is called from perl code which is called
from an embedded perl interpreter with perl_call_sv(...).  Line 40 is
the perl file line number with the xs wrapper function which
ultimately recurses back into perl guts.

I am working on a simplified example of this error to post, but was
hoping somebody would recognize the symptom and offer some insight.

perl -v:
This is perl, version 5.005_03 built for sun4-solaris

Copyright 1987-1999, Larry Wall

Perl may be copied only under the terms of either the Artistic License or
the
GNU General Public License, which may be found in the Perl 5.0 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

g++-v:
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.1/specs
gcc version 2.95.1 19990816 (release)





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

Date: Fri, 07 Jul 2000 16:16:48 +0200
From: Thomas Lambert <thomas.lambert@ndsatcom.de>
Subject: embedding multiple interpreter instances
Message-Id: <3965E650.B45F903B@gmx.de>

I want to embed multiple perl interpreter instances in a c-program under
WIN32 using MS-Developer Studio. Each instance should run in a seperate
thread. Now I have the problem that only one instance can run at the
same time using "perl_run()". If there are more than one instance
running, there are errors (exceptions,...).
In the man-page "perlembed.html" is an example using multiple instances,
but "perl_run()" is called sequentially.
My Question: can I call "perl_run()" more than one time at the same
time, e.g. in multiple threads?




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

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


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