RE: testing CGI without webserver on NT?
HI -- You need to execute the perl script. Change the permissions in IIS to execute BUT make sure that you don't have write set as well;) Mike -Original Message- From: Alaric J. Hammell Sent: Mon 6/10/2002 4:09 PM To: [EMAIL PROTECTED] Cc: Subject: testing CGI without webserver on NT? On Windows2000. I have an html page that calls a perl script in a form but IE does not execute the script but rather asks that it be downloaded. Perl is installed in E:\foo\Perl and not the usual C:\Perl directory. could this have something to do with it? Thanks, Al -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What database would your recommend?
Camilo -- If you've done any research at all you would know that learning perl will not make you less marketable. And if I were you, I would not Marry myself to one scripting language;) Mike -Original Message- From: Camilo Gonzalez Sent: Fri 6/7/2002 12:12 PM To: 'Nikola Janceski'; Camilo Gonzalez; 'Fred Sahakian'; [EMAIL PROTECTED] Cc: Subject: RE: What database would your recommend? Forgive me Nikola. In this business you need to stay as marketable as possible. I don't want to go to a potential employer with six years of Perl on my resume, to be beaten out by somebody with 2 years of PHP on theirs. -Original Message- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 11:06 AM To: 'Camilo Gonzalez'; 'Fred Sahakian'; [EMAIL PROTECTED] Cc: Subject: RE: What database would your recommend? Perl a dying language? are you nutz?!?!?! Haven't you been reading the Apocalypse pages for PERL 6??!?!? http://dev.perl.org/perl6/apocalypse/ apocalypse 1-4 http://www.perl.com/pub/a/2002/06/04/apo5.html apocalypse 5 (pattern matching will never be the same) I get a w**dy just thinking about it. -Original Message- From: Camilo Gonzalez [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 11:57 AM To: 'Fred Sahakian'; [EMAIL PROTECTED] Cc: Subject: RE: What database would your recommend? That's a good point. Are there still advantages to using Perl over using PHP? I'd be bummed to hear I'm using a dying language. -Original Message- From: Fred Sahakian [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 10:52 AM To: [EMAIL PROTECTED] Cc: Subject: Re: What database would your recommend? depends what you need to do, PHP has become VERY popular Octavian Rasnita [EMAIL PROTECTED] 06/05/02 10:58PM Hi all, I want to start learning a database that works with Perl but I would like to learn a database that works under Windows and Unix also. Is there such a thing? Of course, I would like to learn something as simple as possible because I am a beginner in Perl. Thank you. Teddy, [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: @INC
As an alternative, how about this... short sweet and lazy;) BEGIN { $current_dir = 'd:\\my_directory'; push(@INC, $current_dir); } print @INC\n; -Original Message- From: drieux Sent: Mon 5/6/2002 4:07 PM To: [EMAIL PROTECTED] Cc: Subject: Re: @INC On Monday, May 6, 2002, at 12:45 , Seth Lilly wrote: I am brand spanking new to Perl, and I’m working with Plain Black’s WebGUI software. I’m having difficulty specifying the directories for some of my *.pm files. Is there a way to edit a @INC file of some type (if such a thing exists) to include those directories? Thanks, everyone, for helping out the new guy. the easiest trick is a) perldoc h2xs - so that you start with the simple way for churning up the basic PM context: cf: http://www.wetware.com/drieux/CS/lang/Perl/PM/ b) opt to just install them in whereEver the site_perl will land them when you do the make install TRUST ME - it is much simpler that way Unless you really need to 'get funky' - just don't: cf: http://www.wetware.com/drieux/CS/lang/Perl/PM/useLibHack.html and yes you could try the PERLLIB5 environmental variable, but that is like so retrogressive. I mean like so vintage 80's!!! ciao drieux --- { you are clearly taking the wrong turn - you are thinking of perl as a coding language hence that PM's are the logical consequence of that conclusion... So just step on down the yellow brick road one more pace. Do it like you were really planning on sending it to the CPAN... } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: commenting perl
=cut multi line comment =cut __DATA__ Mike -Original Message- From: Shaun Fryer Sent: Tue 4/23/2002 6:37 PM To: Perl Beginners Cc: Subject: commenting perl Is there a simple way to comment multiple lines in Perl in a like manner to the /* or !-- comments in JavaScript and HTML respectively. Or is it absolutely necessary to put a # at the beginning of each individual commented line? === Shaun Fryer === London Webmasters http://LWEB.NET PH: 519-858-9660 FX: 519-858-9024 === -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ODBC - win2k
I would recommend Win32::ODBC from http://www.roth.net Its really easy to use Mike -Original Message- From: Eduardo Cancino [mailto:[EMAIL PROTECTED]] Sent: Monday, April 22, 2002 4:11 PM To: List Beginners Perl Subject: ODBC - win2k Hi everybody, i'm new to perl and i want to connect to an access database. I'm using DBI::ODBC but returns that it can connect to my database: Can't connect to database: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002)(DBD: db_login/SQLConnect err=-1) so, you know where can i read about making my database readable for the script? Thank You! Lalo... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Counting pairs in a hash.
$total = keys %hash; Mike -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 12:44 AM To: 'Glenn Cannon '; '[EMAIL PROTECTED] ' Subject: RE: Counting pairs in a hash. I'm sure there is a better way, but you could do it this way: foreach(keys %hash){ $count++; } print $count keys.\n; -Original Message- From: Glenn Cannon To: [EMAIL PROTECTED] Sent: 4/16/02 7:20 PM Subject: Counting pairs in a hash. All, What is the simplest way to find out how many pairs I have in a hash? I am putting a variable number in when reading data from a file, and I then need to split the file in half for display. Thx, Glenn. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: usefulness of perl for production?
HI Rebecca -- I an still a newbie but I really learned alot from this tutorial: http://www.netcat.co.uk/rob/perl/win32perltut.html After you go thru this tutorial then give learning perl a try. I bet it will be alot easier then:-) Best of luck; perl is really good for windoze admin stuff. Mike -Original Message- From: Auernheimer, Rebecca (CORP, Consultant) [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 12:26 PM To: [EMAIL PROTECTED] Subject: usefulness of perl for production? Hello all, I want to use perl to replace our MS-DOS batch jobs. The main purpose of most of these batch jobs is to move, copy, rename, and zip files in a windows (NT) environment. I use a few variables to add the date into the zip file name and to move the zip file into the appropriate month-named directory. I am having trouble finding information on getting perl to handle these (overly?) simple functions. I want to start very small and gradually build on my knowledge to do more complicated things. I have started reading Learning Perl (2nd ed) and I was overwhelmed, partially because the topics I wanted to cover were not addressed. Someone suggested looking into the system command so I scanned chapter 14, but it does not seem to address my needs, either. I looked at some web sites (perl.org, cpan, perl.com, webmonkey) without finding what I needed. My questions: Is perl appropriate for the tasks I mentioned in the second sentence? If so, where can I get information about how to do those things? Thank you so much for any input you can give me. Rebecca -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Task::Scheduler Nice Windows module
HI all -- Awhile ago I posted a question about accessing Windows Task Scheduler from Perl. Unfortunately, I didn't get a response. Anyways, I found a nice module and wanted to let everyone know incase someone wanted to use Task Scheduler from perl. http://taskscheduler.sourceforge.net Check it out. Its really easy to use and handy if you have to admin windows servers. Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Win32::Scheduler No documentation
Hi all -- Maybe I'm missing something but it doesn't look like there is any documentation for Win32::Schduler:-( I don't know C so I'm having a heck of a time trying to figure this one out. Does anyone have documentation on this one? Sample code for creating a task? I'm looking to use the run at system startup functionality of the TaskScheduler and that's why I chose this module any help would be appreciated Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Another simple program which wont work.
#!/usr/bin/perl-w use strict; my @a= (1, 2, 3, 4); foreach my $word(@a){ print $word ; } try this... Mike -Original Message- From: rabs [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 12, 2002 8:01 PM To: [EMAIL PROTECTED] Subject: Another simple program which wont work. Hi everyone Im trying to get this script to work, I am wondering if anyone in this group can help me. #!/usr/bin/perl-w use strict; @a= (1, 2, 3, 4); foreach $word(@a){ print $word ; } When I run this script I get the following error messages, can you explain in simple english they mean . And provide a corrected script..please. Global symbol @a requires explict package name at script.pl line 4 Global symbol $word requires explict package name at script.pl line 5. Global symbol @a requires explict package name at script.pl line 5. Global symbol $word requires explict package name at script.pl line 6. Execution of script.pl aborted due to complilation errors. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Add remove programs windows ??
I would like to be able to retrieve the same list that pops up in a window when (on 95 NT4) you click the 'Add Remove/ programs' applet in Control Panel. Anybody got any ideas? Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Add remove programs windows ??
Thanks Jenda and Jason; I think you're right!! I was checking on MS's website and here's a URL incase anyone is interested: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q247501 thanks again:-) Mike -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 2:42 PM To: [EMAIL PROTECTED] Subject: Re: Add remove programs windows ?? Steve Maroney [EMAIL PROTECTED] wrote: That is way OT!! in response to: I would like to be able to retrieve the same list that pops up in a window when (on 95 NT4) you click the 'Add Remove/ programs' applet in Control Panel. Anybody got any ideas? Mike Sorry Steve, but it's NOT. If he wants to get the list from a Perl script than the question is perfectly valid for this list. Mike you may want to look into the registry at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall I believe you will need to filter the keys below a bit since I seem to have keys for programs I already deleted as well as keys that are either empty or contain value SystemComponent:DWORD=1. I'm not 100% this is the list you want but I think so. Jenda === [EMAIL PROTECTED] == http://Jenda.Krynicky.cz == There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain. I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: compare between two arrays
from the perl FAQ: @array1 = (1..10); @array2 = (5..15); @union = @intersection = @difference = (); %count = (); foreach $element (@array1, @array2) { $count{$element}++ } foreach $element (keys %count) { push @union, $element; push @{ $count{$element} 1 ? \@intersection : \@difference }, $element; } mike -Original Message- From: Nisim, Amit [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 2:07 PM To: [EMAIL PROTECTED] Subject: compare between two arrays Hi All, I want to compare between two arrays. How can I do it ? One way I know is : $a = (join ,@a); $b = (join ,@b); if ($b eq $a) { print equal;} I am looking for better way. thanks amit -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: a beginners challenge
Huh, sounds fishy... Good try;) M. -Original Message- From: Zysman, Roiy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 28, 2001 1:19 PM To: '[EMAIL PROTECTED]' Subject: a beginners challenge Hi All, Why not make a little challenge .. Lets see who can write the most lean ,mean , elegant , powerful, poetic (but most important) _Shortest_, script that cleans from a directory files that are at least 3 days old. Good luck all, You're welcome to pick who you think is the winner. Roiy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to delete hash element
is it possible to delete a key along with the element?? -Original Message- From: Daniel Gardner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 3:50 PM To: Ahmed Moustafa Ibrahim Ahmed Cc: [EMAIL PROTECTED] Subject: Re: How to delete hash element Tuesday, November 20, 2001, 8:41:03 PM, Ahmed Moustafa Ibrahim Ahmed wrote: AMIA If I know the key and offset of the element, how can I delete that hash AMIA element, please? you can delete a hash element like: delete $hash{ the_key }; but i'm not sure what you mean by the offset of the element -- Best regards, Danielmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Periodic Auto Start
Task scheduler for windows. You can manage task scheduler thru windows with the Win32::AdminMisc module Mike -Original Message- From: Gibbs Tanton - tgibbs [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 2:04 PM To: 'Eric Wang '; '[EMAIL PROTECTED] ' Subject: RE: Periodic Auto Start If you are on a unix system you can use cron man cron I don't know about windows. -Original Message- From: Eric Wang To: [EMAIL PROTECTED] Sent: 10/4/2001 1:03 PM Subject: Periodic Auto Start Hi People, How do I call a perl script periodically. Say everyday at 2:00am, I copy one directory to the backup machine? Thanx Eric -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Formatting text
HI all -- I was searching for a diff-like perl tool for NT and came accross this persons code. Worked well for me. Mike -Original Message- From: Gibbs Tanton - tgibbs [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 10:34 AM To: 'Najamuddin, Junaid '; '[EMAIL PROTECTED] ' Subject: RE: Formatting text If you are on a unix system...you can just say diff file1 file2. On Windows there is probably something comparable. -Original Message- From: Najamuddin, Junaid To: [EMAIL PROTECTED] Sent: 8/28/2001 9:18 AM Subject: Formatting text Hi, Here is my script, I am comparing two txt files which are pipe delimited line by line if they match then their is no output but if they do not match then it gives an output about the difference My both files are loaded in the array and I am comparing line by line How can I compare a value in a certain field within an array line by line between two files so that I can have result I want instead of comparing whole line The txt files are attached for your visual ease they are not pipe delimited and the field names are displayed, In the script they will be pipe delimited without any field name or header If you can help me out thanks my($snapshot, $baseline); # Defining txt files # First file $snapshot = ./302-snap.txt; # List of Svcs currently running loc at c:\perl # Second file $baseline = ./302-base.txt; # List of All Svcs which should be running my(@arr1, @arr2, @result); # Defining arrays my($fld1, $fld2, $fld3, $fld4); # Defining variables for fields my($match, $cnt, $val1, $val2, $finalresult); # Defining scalar variables $match = N; #Open snapshot file and insert every line into @arr1 open(SNAPSHOT, $snapshot) or die Unable to open $snapshot.; # Open the txt file and place it in filehandle $cnt = 0; while ( SNAPSHOT ) # Looping thru the filehandle snapshot { $arr1[$cnt] = $_; $cnt = $cnt + 1; } close (SNAPSHOT); # close the filehandle snapshot #Open baseline file and insert every line into @arr2 open(BASELINE, $baseline) or die Unable to open $baseline.; # Open the txt file and place it in filehandle $cnt = 0; while ( BASELINE ) # Looping thru the filehandle baseline { $arr2[$cnt] = $_; $cnt = $cnt + 1; } close (BASELINE); # close filehandle baseline # Outer loop is for baseline file # Inner loop is for snapshot file # Taking one element from @arr2 (baseline) and comparing it with all the elements in @arr1(snapshot) and # If their is no match then insert that name into @result. $cnt = 0; foreach $val2 (@arr2) # referring to baseline { foreach $val1 (@arr1) # referring to snapshot { if ($val1 eq $val2) { $match = Y; } } if ($match eq N) { $result[$cnt] = $val2; $cnt = $cnt + 1; } $match = N; } $finalresult = 0; # initializing to zero foreach $val1 (@result) { $finalresult = $finalresult + 1; } if ($finalresult 0 ) { print \nList of SICK Siebel-Components \n\n; # If some svc is not functioning foreach $val1 (@result) { ($fld1,$fld2,$fld3,$fld4) = split(/\|/,$val1);# separating req fields for output print Svc-Component $fld4, of Siebel-Svc '$fld3'($fld2)\n; } } else { print \nAll Siebel-Components are Functioning Fine\n; # When all svcs are running fine } 302-base.txt 302-snap.txt ATT3705189.txt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] cdiff.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How does Apache invoke Perl interpreter: OT please don't reply
test -Original Message- From: Qichao Dong (Leon) [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 2:21 PM To: [EMAIL PROTECTED] Subject: How does Apache invoke Perl interpreter Hi, I want to do some research on Perl's transplantability, so I would like to know how an Apache server invokes Perl interpreter - in the case of mod_cgi instead of mod_perl. If anyone knows, or can redirect me to some documentation on the mechanism of Apache, please give me a hint. Thank you. Leon Qichao Dong(Leon) Graduate Research Assistant Innovative Computing Lab Computer Science Dept.University of Tennessee, Knoxville (865)974-9985 [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sending emails: Question newbie
Hi all -- I'm trying to send an email with an attachment from the below code (Gary MacDonald posted the code on activestate. Thanks Gary:-). The code works fine to send email to my Imail Server (type of nt mail server) but when I try to send a message to either ny yahoo mail account or my exchange mail server I don't get the body of the message OR the attachment. Any suggestion would be greatly appreciated. Thanks Mike use Net::SMTP; use MIME::Base64; my $file = 'test.doc'; my $mediatype = 'msword'; open INPUT, $file or die Can't open INPUT file $file: $!\n; binmode INPUT; my $buffer; # my $from = '[EMAIL PROTECTED]'; my $to = '[EMAIL PROTECTED]'; my $server = 'smtp.server.com'; # my $smtp = Net::SMTP-new($server) or die Can't create SMTP object\n; # $smtp-mail($from); $smtp-to($to); # my @msg = MSG; From: $from To: $to Subject: word document attachment MIME-Version: 1.0 Content-type: multipart/mixed; boundary=Boundary $time --Boundary $time Content-type: text/plain This is a test email. --Boundary $time Content-type: application/$mediatype; name=$file Content-disposition: attachment; filename=$file Content-transfer-encoding: base64 MSG # $smtp-data(); $smtp-datasend(@msg); $smtp-datasend(encode_base64($buffer)) while(read (INPUT, $buffer, 60*57)); $smtp-datasend(\n--Boundary $time--\n); $smtp-dataend(); $smtp-quit(); # close INPUT; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sending emails: Question newbie
HI -- Has anyone had a similar problem when sending email with attachments?? Thanks Mike -Original Message- From: Mike Rapuano Sent: Thursday, August 23, 2001 2:07 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; Mike Rapuano Subject: Sending emails: Question newbie Hi all -- I'm trying to send an email with an attachment from the below code (Gary MacDonald posted the code on activestate. Thanks Gary:-). The code works fine to send email to my Imail Server (type of nt mail server) but when I try to send a message to either ny yahoo mail account or my exchange mail server I don't get the body of the message OR the attachment. Any suggestion would be greatly appreciated. Thanks Mike use Net::SMTP; use MIME::Base64; my $file = 'test.doc'; my $mediatype = 'msword'; open INPUT, $file or die Can't open INPUT file $file: $!\n; binmode INPUT; my $buffer; # my $from = '[EMAIL PROTECTED]'; my $to = '[EMAIL PROTECTED]'; my $server = 'smtp.server.com'; # my $smtp = Net::SMTP-new($server) or die Can't create SMTP object\n; # $smtp-mail($from); $smtp-to($to); # my @msg = MSG; From: $from To: $to Subject: word document attachment MIME-Version: 1.0 Content-type: multipart/mixed; boundary=Boundary $time --Boundary $time Content-type: text/plain This is a test email. --Boundary $time Content-type: application/$mediatype; name=$file Content-disposition: attachment; filename=$file Content-transfer-encoding: base64 MSG # $smtp-data(); $smtp-datasend(@msg); $smtp-datasend(encode_base64($buffer)) while(read (INPUT, $buffer, 60*57)); $smtp-datasend(\n--Boundary $time--\n); $smtp-dataend(); $smtp-quit(); # close INPUT; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: passing values to sub
I'm just a beginnner BUT why not use HashRef for the @hits array to make all data going to sub sonic a scalar values Then sub sonic would be... sub sonic { my ($numhits, $maxhits, $hits) = @_; ... } YOu would just need to deference the reference. MIke -Original Message- From: Paul Johnson Sent: Sun 8/5/2001 4:33 PM To: Birgit Kellner Cc: [EMAIL PROTECTED] Subject: Re: passing values to sub On Sun, Aug 05, 2001 at 10:15:09PM +0200, Birgit Kellner wrote: --On Sonntag, 05. August 2001 19:51 +0200 Paul Johnson [EMAIL PROTECTED] wrote: html_record($numhits, $maxhits, @hits); I had figured that much, but got stuck on the other end: The sub in the second file, config.pl, does not get these values. With my @hits = @_; I get the content of @hits all right, but how do I get $numhits and $maxhits? sub sonic { my ($numhits, $maxhits, @hits) = @_; ... } -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]