Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Globalsub and file handles



******    message to minivend-users from Murray Gibbins <murray@scotweb.ltd.uk>     ******

Ryan Hertz wrote:
> 
> ******    message to minivend-users from Ryan Hertz <rhertz@gyb.baits.com>     ******
> 
> Hey list, how's everyone this glorious Wednesday?
> 
> I'm rather clueless with Globalsubs, and I'm having difficulty with this:
> 
> GlobalSub <<EOF
> 
> sub ezineresponse {
> my $user_email = @_;
>         open (MAIL, "|/usr/bin/sendmail -t") || die "Can't open sendmail!\n";
>                 print MAIL "From: ezine\@gyb.baits.com\n";
>                 print MAIL "To: $user_email\n";
>                 open(WELCOME, "< /var/lib/httpd/htdocs/insider/ezine/subscribe-or.txt")
>                         or die "Could not open subscribe-or.txt: $!\n";
>                         my @welcome = <WELCOME>;
>                 close (WELCOME);
>                 foreach my $line (@welcome) {
>                         print MAIL "$line";
>                 }
>    close (MAIL);
> }
> EOF
> 

This code looks sound


> called with [perl sub]ezineresponse foo@bar.com[/perl] from the report page...
>

Try  [perl sub global=1] or [perl sub-=1 global=1] ,

Also have you set this catalog with the AllowGlobal in minivend.cfg ?
-- 
  ____
  \__/    Murray Gibbins             murray@scotweb.ltd.uk
  /  \    Programmer
_ \__/ _  ================================================
\\ || //  Scotweb Limited,             info@scotweb.ltd.uk
 \\||//   13a Albert Terrace,    http://www.scotweb.ltd.uk
  \||/    Edinburgh EH10 5EA   Tel: +44 (0)  131 270 82 33
   ||     Scotland. Europe.    Fax: +44 (0) 7020  93 49 04
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: