Loading ...
Sorry, an error occurred while loading the content.

Sendmail problem

Expand Messages
  • Alan Mackenzie
    I have tried this mini e-mail script two ways and can t get it to send mail. The scripts check out under -c and -wc but don t send mail. Any ideas what the
    Message 1 of 2 , Jan 4, 2001
    • 0 Attachment
      I have tried this mini e-mail script two ways and can't get it to send
      mail. The scripts check out under -c and -wc but don't send mail. Any ideas
      what the problem is?
      (permissions are okay, digiweb site; Solaris system; Apache server)

      1.
      #!/bin/perl
      $from_address = "asm\@...";
      $to_address = "asm\@...";
      $subject='test';
      $body='test sent 8:40';
      open(MAIL, "|/usr/lib/sendmail -oi -t") or die "Can't open sendmail: $!\n";
      print MAIL <<"EOF";
      From: $from_address
      To: $to_address
      Subject: $subject
      sendmail worked
      $body
      EOF
      close(MAIL) or die $! ? "sendmail didn't close nicely: $!\n":
      "sendmail exit code $?";


      2.
      #!/bin/perl
      $from_address="asm/@...";
      $to_address="alan/@...";
      $subject="test";
      $body="test sent 12:00";
      use Mail::Mailer;

      $mailer = Mail::Mailer->new();
      $mailer->open({ From => $from_address,
      To => $to_address,
      Subject => $subject,
      })
      or die "Can't open: $!\n";
      print $mailer $body;
      $mailer->close();


      =============================================
      ***** DEVELOPING AUTONOMY *****
      The 2nd CUE mini-conference
      @
      Shimizu, Shizuoka. May 12-13th 2001.
      Proposals deadline is January 25th 2001
      Need more information?
      http://www.wild-e.org/cue/conferences/autonomy.html
      or contact Eamon McCafferty eamon@...

      ============================================
      Alan Mackenzie
      CUE Coordinator
      College and University Educators Special Interest Group of
      JALT (the Japan Association for Language Teaching)
    • Alan Mackenzie
      ... Yes, no problems. This is an isolated part of a larger script that works perfectly. ... Yes this is the sendmail location The script RUNS, but no mail
      Message 2 of 2 , Jan 7, 2001
      • 0 Attachment
        At 08:19 AM 1/5/01 +0000, you wrote:

        Message: 16
           Date: Fri, 05 Jan 2001 07:00:16 +0000
           From: Kul <aka.Kul@...>
        Subject: Re: Sendmail problem

        Hi Alan,
        When I cut'n'pasted your first example and uploaded it to my server, it ran straight away (after changing the email address and adding a print content-type header).
        Now for a dumb question: Have you got any scripts working before?

        Yes, no problems. This is an isolated part of a larger script that works perfectly.


        Are you sure that sendmail is in that location?

        Yes this is the sendmail location

        The script RUNS, but no mail arrives at my e-mail address. Does anybody have any ideas what can be going wrong?

        Alan Mackenzie wrote:

        > I have tried this mini e-mail script two ways and can't get it to send
        > mail. The scripts check out under -c and -wc but don't send mail. Any ideas
        > what the problem is?
        > (permissions are okay, digiweb site; Solaris system; Apache server)
        >
        > 1.
        > #!/bin/perl
        > $from_address = "asm\@...";
        > $to_address = "asm\@...";
        > $subject='test';
        > $body='test sent 8:40';
        > open(MAIL, "|/usr/lib/sendmail -oi -t") or die "Can't open sendmail: $!\n";
        > print MAIL <<"EOF";
        > From: $from_address
        > To: $to_address
        > Subject: $subject
        > sendmail worked
        > $body
        > EOF
        > close(MAIL) or die $! ? "sendmail didn't close nicely: $!\n":
        > "sendmail exit code $?";
        >
        > 2.
        > #!/bin/perl
        > $from_address="asm/@...";
        > $to_address="alan/@...";
        > $subject="test";
        > $body="test sent 12:00";
        > use Mail::Mailer;
        >
        > $mailer = Mail::Mailer->new();
        > $mailer->open({ From => $from_address,
        > To => $to_address,
        > Subject => $subject,
        > })
        > or die "Can't open: $!\n";
        > print $mailer $body;
        > $mailer->close();
        >
        > =============================================
        > ***** DEVELOPING AUTONOMY *****
        > The 2nd CUE mini-conference
        > @
        > Shimizu, Shizuoka. May 12-13th 2001.
        > Proposals deadline is January 25th 2001
        > Need more information?
        > http://www.wild-e.org/cue/conferences/autonomy.html
        > or contact Eamon McCafferty eamon@...
        >
        > ============================================
        > Alan Mackenzie
        > CUE Coordinator
        > College and University Educators Special Interest Group of
        > JALT (the Japan Association for Language Teaching)


        ________________________________________________________________________
        ________________________________________________________________________

        Message: 17
           Date: Fri, 5 Jan 2001 15:18:05 +0800
           From: "Franki" <frankieh@...>
        Subject: Dumb Question that is driving me nuts.

        Hi all,

        I am new and not terribly good a perl yet and I have a problem that is
        making me pull my hair out.

        I have an auto config script that is supposed to offer a way for people to
        configure another script via their browser.

        There is a section in this script that is supposed to add variables to a
        config file, it looks like the following.

        print LOGFILE "$CHECKOUT_PATH\n
        $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        GOCART_FORM_COLOUR1\n" ;

        This just puts the values of the above variables in the file. Like so:


        /home/httpd/cgi-bin/checkout/
        YourPassword
        Your IP Address
        E-Pay Server Address
        franki@...
        Mail Server IP Address.
        http://www.yourdomain.com.au
        TEST_SERVER
        CHECKOUT
        http://www.yourdomain.com.au/your_cart_address
        http://www.yourdomain.com.au/images/title.jpg
        My Stores Name
        #008000
        #008000
        http://www.yourdomain.com.au/cgi-bin/checkout/GoCart.pl
        http://www.yourdomain.com.au/cgi-bin/checkout/Checkout.pl
        http://www.yourdomain.com.au/images/title.jpg
        My Stores Name
        #008000
        #008000


        I need it to print out the following,. ( I'll just do it for the first one,
        there is no need to do them all.)

        $CHECKOUT_PATH="/home/httpd/cgi-bin/checkout/"
        I need it to print out as above instead of just the variables value.

        But no matter what I do, it doesn't print it out properly.

        Any anyone help me in how to setup the:

        print LOGFILE "$CHECKOUT_PATH\n
        $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        GOCART_FORM_COLOUR1\n" ;

        line so that it prints out the lot in the correct format?


        Thankyou all,

        Kindest regards


        Frank Hauptle
        http://www.gshop.com.au/
        franki@...

        -----Original Message-----
        From: Kul [mailto:aka.Kul@...]
        Sent: Friday, 5 January 2001 3:00 PM
        To: perl-beginner@egroups.com
        Subject: Re: [PBML] Sendmail problem

        Hi Alan,
        When I cut'n'pasted your first example and uploaded it to my server, it ran
        straight away (after changing the email address and adding a print
        content-type header).
        Now for a dumb question: Have you got any scripts working before?
        Are you sure that sendmail is in that location?
        try locating sendmail via telnet/ssh etc ("whereis sendmail")
        or if you dont have access to telnet/ssh, try this baby script:

        #!/bin/perl
        print "Content-type: text/plain", "\n\n";
        $sendmail =`whereis sendmail`;
        @mailloc = split(" ", $sendmail);
        foreach $loc (@mailloc)    {     print "$loc\n";    }

        Regards
        Kul

        Alan Mackenzie wrote:

        > I have tried this mini e-mail script two ways and can't get it to send
        > mail. The scripts check out under -c and -wc but don't send mail. Any
        ideas
        > what the problem is?
        > (permissions are okay, digiweb site; Solaris system; Apache server)
        >
        > 1.
        > #!/bin/perl
        > $from_address = "asm\@...";
        > $to_address = "asm\@...";
        > $subject='test';
        > $body='test sent 8:40';
        > open(MAIL, "|/usr/lib/sendmail -oi -t") or die "Can't open sendmail:
        $!\n";
        > print MAIL <<"EOF";
        > From: $from_address
        > To: $to_address
        > Subject: $subject
        > sendmail worked
        > $body
        > EOF
        > close(MAIL) or die $! ? "sendmail didn't close nicely: $!\n":
        > "sendmail exit code $?";
        >
        > 2.
        > #!/bin/perl
        > $from_address="asm/@...";
        > $to_address="alan/@...";
        > $subject="test";
        > $body="test sent 12:00";
        > use Mail::Mailer;
        >
        > $mailer = Mail::Mailer->new();
        > $mailer->open({ From => $from_address,
        > To => $to_address,
        > Subject => $subject,
        > })
        > or die "Can't open: $!\n";
        > print $mailer $body;
        > $mailer->close();
        >
        > =============================================
        > ***** DEVELOPING AUTONOMY *****
        > The 2nd CUE mini-conference
        > @
        > Shimizu, Shizuoka. May 12-13th 2001.
        > Proposals deadline is January 25th 2001
        > Need more information?
        > http://www.wild-e.org/cue/conferences/autonomy.html
        > or contact Eamon McCafferty eamon@...
        >
        > ============================================
        > Alan Mackenzie
        > CUE Coordinator
        > College and University Educators Special Interest Group of
        > JALT (the Japan Association for Language Teaching)




        ________________________________________________________________________
        ________________________________________________________________________

        Message: 18
           Date: Fri, 05 Jan 2001 07:31:07 +0000
           From: Kul <aka.Kul@...>
        Subject: Re: Dumb Question that is driving me nuts.

        Franki,

        try this: (I have split the origional print onto mutiple lines - for readability only, and I know the one-programmers wont like it :-(  )

        print LOGFILE "\$CHECKOUT_PATH=\"$CHECKOUT_PATH\"\n";
        print LOGFILE "\$HASHKEY_PASSWORD=\"$HASHKEY_PASSWORD\"\n";
        ....
        ....
        and so on

        explanation:
        the \ infront of the $ (\$CHECKOUT_PATH) tells it to print this literally, ie not interpret it
        the \ infront of the " (same as above) or it will think this is the end of the PRINT command - cause errors.

        Regards
        Kul
        --
        +------- ------ ----- ---- --- -- - - -  -   -    -     -      -
        "Scientia est Potentia" - "Knowledge is Power" ...... if you ain't got it, then blag it!
        +------- ------ ----- ---- --- -- - - -  -   -    -     -      -
         Any Syntax or Spelling Errors are nothing to do with me,
              They must be Transmission Errors !
        +------- ------ ----- ---- --- -- - - -  -   -    -     -      -


        Franki wrote:

        > Hi all,
        >
        > I am new and not terribly good a perl yet and I have a problem that is
        > making me pull my hair out.
        >
        > I have an auto config script that is supposed to offer a way for people to
        > configure another script via their browser.
        >
        > There is a section in this script that is supposed to add variables to a
        > config file, it looks like the following.
        >
        > print LOGFILE "$CHECKOUT_PATH\n
        > $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        > E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        > ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        > T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        > GOCART_FORM_COLOUR1\n" ;
        >
        > This just puts the values of the above variables in the file. Like so:
        >
        > /home/httpd/cgi-bin/checkout/
        > YourPassword
        > Your IP Address
        > E-Pay Server Address
        > franki@...
        > Mail Server IP Address.
        > http://www.yourdomain.com.au
        > TEST_SERVER
        > CHECKOUT
        > http://www.yourdomain.com.au/your_cart_address
        > http://www.yourdomain.com.au/images/title.jpg
        > My Stores Name
        > #008000
        > #008000
        > http://www.yourdomain.com.au/cgi-bin/checkout/GoCart.pl
        > http://www.yourdomain.com.au/cgi-bin/checkout/Checkout.pl
        > http://www.yourdomain.com.au/images/title.jpg
        > My Stores Name
        > #008000
        > #008000
        >
        > I need it to print out the following,. ( I'll just do it for the first one,
        > there is no need to do them all.)
        >
        > $CHECKOUT_PATH="/home/httpd/cgi-bin/checkout/"
        > I need it to print out as above instead of just the variables value.
        >
        > But no matter what I do, it doesn't print it out properly.
        >
        > Any anyone help me in how to setup the:
        >
        > print LOGFILE "$CHECKOUT_PATH\n
        > $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        > E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        > ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        > T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        > GOCART_FORM_COLOUR1\n" ;
        >
        > line so that it prints out the lot in the correct format?
        >
        > Thankyou all,
        >
        > Kindest regards
        >
        > Frank Hauptle
        > http://www.gshop.com.au/
        > franki@...



        ________________________________________________________________________
        ________________________________________________________________________

        Message: 19
           Date: Fri, 5 Jan 2001 15:27:36 +0800
           From: "Franki" <frankieh@...>
        Subject: another quick dumb question.

        Hi all again,,,

        I have another small question,

        If I have a file, say confix.txt, that is written to each time people fill
        out a form, how can I have the config.txt file wiped of contents first.

        There can only be one set of values in that file, and the way it is now,
        each time I run the script, it just adds the new values to the bottom of the
        old ones.

        So that won't work.  Is there an easy way to just wipe the contents of the
        file before the new values are written to it?

        Kindest regards

        Frank Hauptle
        http://www.gshop.com.au/
        franki@...

        -----Original Message-----
        From: Franki [mailto:frankieh@...]
        Sent: Friday, 5 January 2001 3:18 PM
        To: perl-beginner@egroups.com
        Subject: [PBML] Dumb Question that is driving me nuts.

        Hi all,

        I am new and not terribly good a perl yet and I have a problem that is
        making me pull my hair out.

        I have an auto config script that is supposed to offer a way for people to
        configure another script via their browser.

        There is a section in this script that is supposed to add variables to a
        config file, it looks like the following.

        print LOGFILE "$CHECKOUT_PATH\n
        $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        GOCART_FORM_COLOUR1\n" ;

        This just puts the values of the above variables in the file. Like so:


        /home/httpd/cgi-bin/checkout/
        YourPassword
        Your IP Address
        E-Pay Server Address
        franki@...
        Mail Server IP Address.
        http://www.yourdomain.com.au
        TEST_SERVER
        CHECKOUT
        http://www.yourdomain.com.au/your_cart_address
        http://www.yourdomain.com.au/images/title.jpg
        My Stores Name
        #008000
        #008000
        http://www.yourdomain.com.au/cgi-bin/checkout/GoCart.pl
        http://www.yourdomain.com.au/cgi-bin/checkout/Checkout.pl
        http://www.yourdomain.com.au/images/title.jpg
        My Stores Name
        #008000
        #008000


        I need it to print out the following,. ( I'll just do it for the first one,
        there is no need to do them all.)

        $CHECKOUT_PATH="/home/httpd/cgi-bin/checkout/"
        I need it to print out as above instead of just the variables value.

        But no matter what I do, it doesn't print it out properly.

        Any anyone help me in how to setup the:

        print LOGFILE "$CHECKOUT_PATH\n
        $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        GOCART_FORM_COLOUR1\n" ;

        line so that it prints out the lot in the correct format?


        Thankyou all,

        Kindest regards


        Frank Hauptle
        http://www.gshop.com.au/
        franki@...

        -----Original Message-----
        From: Kul [mailto:aka.Kul@...]
        Sent: Friday, 5 January 2001 3:00 PM
        To: perl-beginner@egroups.com
        Subject: Re: [PBML] Sendmail problem

        Hi Alan,
        When I cut'n'pasted your first example and uploaded it to my server, it ran
        straight away (after changing the email address and adding a print
        content-type header).
        Now for a dumb question: Have you got any scripts working before?
        Are you sure that sendmail is in that location?
        try locating sendmail via telnet/ssh etc ("whereis sendmail")
        or if you dont have access to telnet/ssh, try this baby script:

        #!/bin/perl
        print "Content-type: text/plain", "\n\n";
        $sendmail =`whereis sendmail`;
        @mailloc = split(" ", $sendmail);
        foreach $loc (@mailloc)    {     print "$loc\n";    }

        Regards
        Kul

        Alan Mackenzie wrote:

        > I have tried this mini e-mail script two ways and can't get it to send
        > mail. The scripts check out under -c and -wc but don't send mail. Any
        ideas
        > what the problem is?
        > (permissions are okay, digiweb site; Solaris system; Apache server)
        >
        > 1.
        > #!/bin/perl
        > $from_address = "asm\@...";
        > $to_address = "asm\@...";
        > $subject='test';
        > $body='test sent 8:40';
        > open(MAIL, "|/usr/lib/sendmail -oi -t") or die "Can't open sendmail:
        $!\n";
        > print MAIL <<"EOF";
        > From: $from_address
        > To: $to_address
        > Subject: $subject
        > sendmail worked
        > $body
        > EOF
        > close(MAIL) or die $! ? "sendmail didn't close nicely: $!\n":
        > "sendmail exit code $?";
        >
        > 2.
        > #!/bin/perl
        > $from_address="asm/@...";
        > $to_address="alan/@...";
        > $subject="test";
        > $body="test sent 12:00";
        > use Mail::Mailer;
        >
        > $mailer = Mail::Mailer->new();
        > $mailer->open({ From => $from_address,
        > To => $to_address,
        > Subject => $subject,
        > })
        > or die "Can't open: $!\n";
        > print $mailer $body;
        > $mailer->close();
        >
        > =============================================
        > ***** DEVELOPING AUTONOMY *****
        > The 2nd CUE mini-conference
        > @
        > Shimizu, Shizuoka. May 12-13th 2001.
        > Proposals deadline is January 25th 2001
        > Need more information?
        > http://www.wild-e.org/cue/conferences/autonomy.html
        > or contact Eamon McCafferty eamon@...
        >
        > ============================================
        > Alan Mackenzie
        > CUE Coordinator
        > College and University Educators Special Interest Group of
        > JALT (the Japan Association for Language Teaching)






        ________________________________________________________________________
        ________________________________________________________________________

        Message: 20
           Date: Fri, 5 Jan 2001 15:31:47 +0800
           From: "Franki" <frankieh@...>
        Subject: RE: Dumb Question that is driving me nuts.

        Excellent, you're a legend, works great.


        One last thing,  :)

        The line $CHECKOUT_PATH="/home/httpd/cgi-bin/checkout"  needs to be changed
        to $CHECKOUT_PATH="//home//httpd//cgi-bin//checkout"

        Is it possible to add a line to the script that takes the value of
        $CHECKOUT_PATH (which is always a local server path) and add the second /'s
        to it?

        I love this mailing list, can't believe I got an answer less then 10 minutes
        after I wrote the question, that's excellent.



        regards

        Frank Hauptle
        http://www.gshop.com.au/
        franki@...

        -----Original Message-----
        From: Kul [mailto:aka.Kul@...]
        Sent: Friday, 5 January 2001 3:31 PM
        To: perl-beginner@egroups.com
        Subject: Re: [PBML] Dumb Question that is driving me nuts.

        Franki,

        try this: (I have split the origional print onto mutiple lines - for
        readability only, and I know the one-programmers wont like it :-(  )

        print LOGFILE "\$CHECKOUT_PATH=\"$CHECKOUT_PATH\"\n";
        print LOGFILE "\$HASHKEY_PASSWORD=\"$HASHKEY_PASSWORD\"\n";
        ....
        ....
        and so on

        explanation:
        the \ infront of the $ (\$CHECKOUT_PATH) tells it to print this literally,
        ie not interpret it
        the \ infront of the " (same as above) or it will think this is the end of
        the PRINT command - cause errors.

        Regards
        Kul
        --
        +------- ------ ----- ---- --- -- - - -  -   -    -     -      -
        "Scientia est Potentia" - "Knowledge is Power" ...... if you ain't got it,
        then blag it!
        +------- ------ ----- ---- --- -- - - -  -   -    -     -      -
         Any Syntax or Spelling Errors are nothing to do with me,
              They must be Transmission Errors !
        +------- ------ ----- ---- --- -- - - -  -   -    -     -      -


        Franki wrote:

        > Hi all,
        >
        > I am new and not terribly good a perl yet and I have a problem that is
        > making me pull my hair out.
        >
        > I have an auto config script that is supposed to offer a way for people to
        > configure another script via their browser.
        >
        > There is a section in this script that is supposed to add variables to a
        > config file, it looks like the following.
        >
        > print LOGFILE "$CHECKOUT_PATH\n
        >
        $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        >
        E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        >
        ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        >
        T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        > GOCART_FORM_COLOUR1\n" ;
        >
        > This just puts the values of the above variables in the file. Like so:
        >
        > /home/httpd/cgi-bin/checkout/
        > YourPassword
        > Your IP Address
        > E-Pay Server Address
        > franki@...
        > Mail Server IP Address.
        > http://www.yourdomain.com.au
        > TEST_SERVER
        > CHECKOUT
        > http://www.yourdomain.com.au/your_cart_address
        > http://www.yourdomain.com.au/images/title.jpg
        > My Stores Name
        > #008000
        > #008000
        > http://www.yourdomain.com.au/cgi-bin/checkout/GoCart.pl
        > http://www.yourdomain.com.au/cgi-bin/checkout/Checkout.pl
        > http://www.yourdomain.com.au/images/title.jpg
        > My Stores Name
        > #008000
        > #008000
        >
        > I need it to print out the following,. ( I'll just do it for the first
        one,
        > there is no need to do them all.)
        >
        > $CHECKOUT_PATH="/home/httpd/cgi-bin/checkout/"
        > I need it to print out as above instead of just the variables value.
        >
        > But no matter what I do, it doesn't print it out properly.
        >
        > Any anyone help me in how to setup the:
        >
        > print LOGFILE "$CHECKOUT_PATH\n
        >
        $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        >
        E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        >
        ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        >
        T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        > GOCART_FORM_COLOUR1\n" ;
        >
        > line so that it prints out the lot in the correct format?
        >
        > Thankyou all,
        >
        > Kindest regards
        >
        > Frank Hauptle
        > http://www.gshop.com.au/
        > franki@...





        ________________________________________________________________________
        ________________________________________________________________________

        Message: 21
           Date: Fri, 05 Jan 2001 07:51:53 +0000
           From: Kul <aka.Kul@...>
        Subject: Re: Dumb Question that is driving me nuts.


        $CHECKOUT_PATH =~ s/\//\/\//g;
        then print it as per before

        Franki wrote:

        > Excellent, you're a legend, works great.
        >
        > One last thing,  :)
        >
        > The line $CHECKOUT_PATH="/home/httpd/cgi-bin/checkout"  needs to be changed
        > to $CHECKOUT_PATH="//home//httpd//cgi-bin//checkout"
        >
        > Is it possible to add a line to the script that takes the value of
        > $CHECKOUT_PATH (which is always a local server path) and add the second /'s
        > to it?
        >
        > I love this mailing list, can't believe I got an answer less then 10 minutes
        > after I wrote the question, that's excellent.
        >
        > regards
        >
        > Frank Hauptle
        > http://www.gshop.com.au/
        > franki@...
        >
        > -----Original Message-----
        > From: Kul [mailto:aka.Kul@...]
        > Sent: Friday, 5 January 2001 3:31 PM
        > To: perl-beginner@egroups.com
        > Subject: Re: [PBML] Dumb Question that is driving me nuts.
        >
        > Franki,
        >
        > try this: (I have split the origional print onto mutiple lines - for
        > readability only, and I know the one-programmers wont like it :-(  )
        >
        > print LOGFILE "\$CHECKOUT_PATH=\"$CHECKOUT_PATH\"\n";
        > print LOGFILE "\$HASHKEY_PASSWORD=\"$HASHKEY_PASSWORD\"\n";
        > ....
        > ....
        > and so on
        >
        > explanation:
        > the \ infront of the $ (\$CHECKOUT_PATH) tells it to print this literally,
        > ie not interpret it
        > the \ infront of the " (same as above) or it will think this is the end of
        > the PRINT command - cause errors.
        >
        > Regards
        > Kul
        > --
        > +------- ------ ----- ---- --- -- - - -  -   -    -     -      -
        > "Scientia est Potentia" - "Knowledge is Power" ...... if you ain't got it,
        > then blag it!
        > +------- ------ ----- ---- --- -- - - -  -   -    -     -      -
        >  Any Syntax or Spelling Errors are nothing to do with me,
        >       They must be Transmission Errors !
        > +------- ------ ----- ---- --- -- - - -  -   -    -     -      -
        >
        > Franki wrote:
        >
        > > Hi all,
        > >
        > > I am new and not terribly good a perl yet and I have a problem that is
        > > making me pull my hair out.
        > >
        > > I have an auto config script that is supposed to offer a way for people to
        > > configure another script via their browser.
        > >
        > > There is a section in this script that is supposed to add variables to a
        > > config file, it looks like the following.
        > >
        > > print LOGFILE "$CHECKOUT_PATH\n
        > >
        > $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        > >
        > E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        > >
        > ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        > >
        > T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        > > GOCART_FORM_COLOUR1\n" ;
        > >
        > > This just puts the values of the above variables in the file. Like so:
        > >
        > > /home/httpd/cgi-bin/checkout/
        > > YourPassword
        > > Your IP Address
        > > E-Pay Server Address
        > > franki@...
        > > Mail Server IP Address.
        > > http://www.yourdomain.com.au
        > > TEST_SERVER
        > > CHECKOUT
        > > http://www.yourdomain.com.au/your_cart_address
        > > http://www.yourdomain.com.au/images/title.jpg
        > > My Stores Name
        > > #008000
        > > #008000
        > > http://www.yourdomain.com.au/cgi-bin/checkout/GoCart.pl
        > > http://www.yourdomain.com.au/cgi-bin/checkout/Checkout.pl
        > > http://www.yourdomain.com.au/images/title.jpg
        > > My Stores Name
        > > #008000
        > > #008000
        > >
        > > I need it to print out the following,. ( I'll just do it for the first
        > one,
        > > there is no need to do them all.)
        > >
        > > $CHECKOUT_PATH="/home/httpd/cgi-bin/checkout/"
        > > I need it to print out as above instead of just the variables value.
        > >
        > > But no matter what I do, it doesn't print it out properly.
        > >
        > > Any anyone help me in how to setup the:
        > >
        > > print LOGFILE "$CHECKOUT_PATH\n
        > >
        > $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        > >
        > E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        > >
        > ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        > >
        > T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        > > GOCART_FORM_COLOUR1\n" ;
        > >
        > > line so that it prints out the lot in the correct format?
        > >
        > > Thankyou all,
        > >
        > > Kindest regards
        > >
        > > Frank Hauptle
        > > http://www.gshop.com.au/
        > > franki@...



        ________________________________________________________________________
        ________________________________________________________________________

        Message: 22
           Date: Fri, 05 Jan 2001 07:57:57 +0000
           From: Kul <aka.Kul@...>
        Subject: Re: another quick dumb question.

        Franki,

        You really needed to say how exactly you are writing (opening mainly) the file !  (friendly tip for next time)
        The easiest way is when you open the file to write to it, ensure that you opne it like this:
            open (THEFILEHANDLE, ">$thefiledirandname") or die ......
        instead of:
            open (THEFILEHANDLE, ">>$thefiledirandname") or die ......
        which is how I GUESS you are opening it. (subtle difference of one > rather than two >>)
            one > = overwrite
            two >> =  append
        I however would strongly recommend you get a PERL book and look up SYSOPEN and avoid using OPEN altogether, SYSOPEN is much less able to be altered by any input data from command line and input forms etc..

        Regards,
        Kul

        Franki wrote:

        > Hi all again,,,
        >
        > I have another small question,
        >
        > If I have a file, say confix.txt, that is written to each time people fill
        > out a form, how can I have the config.txt file wiped of contents first.
        >
        > There can only be one set of values in that file, and the way it is now,
        > each time I run the script, it just adds the new values to the bottom of the
        > old ones.
        >
        > So that won't work.  Is there an easy way to just wipe the contents of the
        > file before the new values are written to it?
        >
        > Kindest regards
        >
        > Frank Hauptle
        > http://www.gshop.com.au/
        > franki@...
        >
        > -----Original Message-----
        > From: Franki [mailto:frankieh@...]
        > Sent: Friday, 5 January 2001 3:18 PM
        > To: perl-beginner@egroups.com
        > Subject: [PBML] Dumb Question that is driving me nuts.
        >
        > Hi all,
        >
        > I am new and not terribly good a perl yet and I have a problem that is
        > making me pull my hair out.
        >
        > I have an auto config script that is supposed to offer a way for people to
        > configure another script via their browser.
        >
        > There is a section in this script that is supposed to add variables to a
        > config file, it looks like the following.
        >
        > print LOGFILE "$CHECKOUT_PATH\n
        > $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        > E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        > ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        > T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        > GOCART_FORM_COLOUR1\n" ;
        >
        > This just puts the values of the above variables in the file. Like so:
        >
        > /home/httpd/cgi-bin/checkout/
        > YourPassword
        > Your IP Address
        > E-Pay Server Address
        > franki@...
        > Mail Server IP Address.
        > http://www.yourdomain.com.au
        > TEST_SERVER
        > CHECKOUT
        > http://www.yourdomain.com.au/your_cart_address
        > http://www.yourdomain.com.au/images/title.jpg
        > My Stores Name
        > #008000
        > #008000
        > http://www.yourdomain.com.au/cgi-bin/checkout/GoCart.pl
        > http://www.yourdomain.com.au/cgi-bin/checkout/Checkout.pl
        > http://www.yourdomain.com.au/images/title.jpg
        > My Stores Name
        > #008000
        > #008000
        >
        > I need it to print out the following,. ( I'll just do it for the first one,
        > there is no need to do them all.)
        >
        > $CHECKOUT_PATH="/home/httpd/cgi-bin/checkout/"
        > I need it to print out as above instead of just the variables value.
        >
        > But no matter what I do, it doesn't print it out properly.
        >
        > Any anyone help me in how to setup the:
        >
        > print LOGFILE "$CHECKOUT_PATH\n
        > $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        > E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        > ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        > T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        > GOCART_FORM_COLOUR1\n" ;
        >
        > line so that it prints out the lot in the correct format?
        >
        > Thankyou all,
        >
        > Kindest regards
        >
        > Frank Hauptle
        > http://www.gshop.com.au/
        > franki@...
        >
        > -----Original Message-----
        > From: Kul [mailto:aka.Kul@...]
        > Sent: Friday, 5 January 2001 3:00 PM
        > To: perl-beginner@egroups.com
        > Subject: Re: [PBML] Sendmail problem
        >
        > Hi Alan,
        > When I cut'n'pasted your first example and uploaded it to my server, it ran
        > straight away (after changing the email address and adding a print
        > content-type header).
        > Now for a dumb question: Have you got any scripts working before?
        > Are you sure that sendmail is in that location?
        > try locating sendmail via telnet/ssh etc ("whereis sendmail")
        > or if you dont have access to telnet/ssh, try this baby script:
        >
        > #!/bin/perl
        > print "Content-type: text/plain", "\n\n";
        > $sendmail =`whereis sendmail`;
        > @mailloc = split(" ", $sendmail);
        > foreach $loc (@mailloc)    {     print "$loc\n";    }
        >
        > Regards
        > Kul
        >
        > Alan Mackenzie wrote:
        >
        > > I have tried this mini e-mail script two ways and can't get it to send
        > > mail. The scripts check out under -c and -wc but don't send mail. Any
        > ideas
        > > what the problem is?
        > > (permissions are okay, digiweb site; Solaris system; Apache server)
        > >
        > > 1.
        > > #!/bin/perl
        > > $from_address = "asm\@...";
        > > $to_address = "asm\@...";
        > > $subject='test';
        > > $body='test sent 8:40';
        > > open(MAIL, "|/usr/lib/sendmail -oi -t") or die "Can't open sendmail:
        > $!\n";
        > > print MAIL <<"EOF";
        > > From: $from_address
        > > To: $to_address
        > > Subject: $subject
        > > sendmail worked
        > > $body
        > > EOF
        > > close(MAIL) or die $! ? "sendmail didn't close nicely: $!\n":
        > > "sendmail exit code $?";
        > >
        > > 2.
        > > #!/bin/perl
        > > $from_address="asm/@...";
        > > $to_address="alan/@...";
        > > $subject="test";
        > > $body="test sent 12:00";
        > > use Mail::Mailer;
        > >
        > > $mailer = Mail::Mailer->new();
        > > $mailer->open({ From => $from_address,
        > > To => $to_address,
        > > Subject => $subject,
        > > })
        > > or die "Can't open: $!\n";
        > > print $mailer $body;
        > > $mailer->close();
        > >
        > > =============================================
        > > ***** DEVELOPING AUTONOMY *****
        > > The 2nd CUE mini-conference
        > > @
        > > Shimizu, Shizuoka. May 12-13th 2001.
        > > Proposals deadline is January 25th 2001
        > > Need more information?
        > > http://www.wild-e.org/cue/conferences/autonomy.html
        > > or contact Eamon McCafferty eamon@...
        > >
        > > ============================================
        > > Alan Mackenzie
        > > CUE Coordinator
        > > College and University Educators Special Interest Group of
        > > JALT (the Japan Association for Language Teaching)



        ________________________________________________________________________
        ________________________________________________________________________

        Message: 23
           Date: Fri, 5 Jan 2001 16:03:03 +0800
           From: "Franki" <frankieh@...>
        Subject: RE: Dumb Question that is driving me nuts.

        That worked too !!!!!!!!

        I am  young and have sooooooo much to learn.  :)

        Thankyou again...

        Frank Hauptle
        http://www.gshop.com.au/
        franki@...

        -----Original Message-----
        From: Kul [mailto:aka.Kul@...]
        Sent: Friday, 5 January 2001 3:52 PM
        To: perl-beginner@egroups.com
        Subject: Re: [PBML] Dumb Question that is driving me nuts.


        $CHECKOUT_PATH =~ s/\//\/\//g;
        then print it as per before

        Franki wrote:

        > Excellent, you're a legend, works great.
        >
        > One last thing,  :)
        >
        > The line $CHECKOUT_PATH="/home/httpd/cgi-bin/checkout"  needs to be
        changed
        > to $CHECKOUT_PATH="//home//httpd//cgi-bin//checkout"
        >
        > Is it possible to add a line to the script that takes the value of
        > $CHECKOUT_PATH (which is always a local server path) and add the second
        /'s
        > to it?
        >
        > I love this mailing list, can't believe I got an answer less then 10
        minutes
        > after I wrote the question, that's excellent.
        >
        > regards
        >
        > Frank Hauptle
        > http://www.gshop.com.au/
        > franki@...
        >
        > -----Original Message-----
        > From: Kul [mailto:aka.Kul@...]
        > Sent: Friday, 5 January 2001 3:31 PM
        > To: perl-beginner@egroups.com
        > Subject: Re: [PBML] Dumb Question that is driving me nuts.
        >
        > Franki,
        >
        > try this: (I have split the origional print onto mutiple lines - for
        > readability only, and I know the one-programmers wont like it :-(  )
        >
        > print LOGFILE "\$CHECKOUT_PATH=\"$CHECKOUT_PATH\"\n";
        > print LOGFILE "\$HASHKEY_PASSWORD=\"$HASHKEY_PASSWORD\"\n";
        > ....
        > ....
        > and so on
        >
        > explanation:
        > the \ infront of the $ (\$CHECKOUT_PATH) tells it to print this literally,
        > ie not interpret it
        > the \ infront of the " (same as above) or it will think this is the end of
        > the PRINT command - cause errors.
        >
        > Regards
        > Kul
        > --
        > +------- ------ ----- ---- --- -- - - -  -   -    -     -      -
        > "Scientia est Potentia" - "Knowledge is Power" ...... if you ain't got it,
        > then blag it!
        > +------- ------ ----- ---- --- -- - - -  -   -    -     -      -
        >  Any Syntax or Spelling Errors are nothing to do with me,
        >       They must be Transmission Errors !
        > +------- ------ ----- ---- --- -- - - -  -   -    -     -      -
        >
        > Franki wrote:
        >
        > > Hi all,
        > >
        > > I am new and not terribly good a perl yet and I have a problem that is
        > > making me pull my hair out.
        > >
        > > I have an auto config script that is supposed to offer a way for people
        to
        > > configure another script via their browser.
        > >
        > > There is a section in this script that is supposed to add variables to a
        > > config file, it looks like the following.
        > >
        > > print LOGFILE "$CHECKOUT_PATH\n
        > >
        >
        $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        > >
        >
        E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        > >
        >
        ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        > >
        >
        T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        > > GOCART_FORM_COLOUR1\n" ;
        > >
        > > This just puts the values of the above variables in the file. Like so:
        > >
        > > /home/httpd/cgi-bin/checkout/
        > > YourPassword
        > > Your IP Address
        > > E-Pay Server Address
        > > franki@...
        > > Mail Server IP Address.
        > > http://www.yourdomain.com.au
        > > TEST_SERVER
        > > CHECKOUT
        > > http://www.yourdomain.com.au/your_cart_address
        > > http://www.yourdomain.com.au/images/title.jpg
        > > My Stores Name
        > > #008000
        > > #008000
        > > http://www.yourdomain.com.au/cgi-bin/checkout/GoCart.pl
        > > http://www.yourdomain.com.au/cgi-bin/checkout/Checkout.pl
        > > http://www.yourdomain.com.au/images/title.jpg
        > > My Stores Name
        > > #008000
        > > #008000
        > >
        > > I need it to print out the following,. ( I'll just do it for the first
        > one,
        > > there is no need to do them all.)
        > >
        > > $CHECKOUT_PATH="/home/httpd/cgi-bin/checkout/"
        > > I need it to print out as above instead of just the variables value.
        > >
        > > But no matter what I do, it doesn't print it out properly.
        > >
        > > Any anyone help me in how to setup the:
        > >
        > > print LOGFILE "$CHECKOUT_PATH\n
        > >
        >
        $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        > >
        >
        E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        > >
        >
        ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        > >
        >
        T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        > > GOCART_FORM_COLOUR1\n" ;
        > >
        > > line so that it prints out the lot in the correct format?
        > >
        > > Thankyou all,
        > >
        > > Kindest regards
        > >
        > > Frank Hauptle
        > > http://www.gshop.com.au/
        > > franki@...





        ________________________________________________________________________
        ________________________________________________________________________

        Message: 24
           Date: Fri, 5 Jan 2001 16:09:12 +0800
           From: "Franki" <frankieh@...>
        Subject: RE: another quick dumb question.

        Thankyou so much, you were right, and it works great and I am getting a
        couple of Perl books for just such purposes.

        Does SYSOPEN work on Unix and NT perl?

        This script needs to work for both.

        Thankyou again so much.  I have just saved me about 5 hours work with your 3
        emails.


        Frank Hauptle
        http://www.gshop.com.au/
        franki@...

        -----Original Message-----
        From: Kul [mailto:aka.Kul@...]
        Sent: Friday, 5 January 2001 3:58 PM
        To: perl-beginner@egroups.com
        Subject: Re: [PBML] another quick dumb question.

        Franki,

        You really needed to say how exactly you are writing (opening mainly) the
        file !  (friendly tip for next time)
        The easiest way is when you open the file to write to it, ensure that you
        opne it like this:
            open (LOGFILE, "> config.txt ") ;or die ......
        instead of:
            open (THEFILEHANDLE, ">>$thefiledirandname") or die ......
        which is how I GUESS you are opening it. (subtle difference of one > rather
        than two >>)
            one > = overwrite
            two >> =  append
        I however would strongly recommend you get a PERL book and look up SYSOPEN
        and avoid using OPEN altogether, SYSOPEN is much less able to be altered by
        any input data from command line and input forms etc..

        Regards,
        Kul

        Franki wrote:

        > Hi all again,,,
        >
        > I have another small question,
        >
        > If I have a file, say confix.txt, that is written to each time people fill
        > out a form, how can I have the config.txt file wiped of contents first.
        >
        > There can only be one set of values in that file, and the way it is now,
        > each time I run the script, it just adds the new values to the bottom of
        the
        > old ones.
        >
        > So that won't work.  Is there an easy way to just wipe the contents of the
        > file before the new values are written to it?
        >
        > Kindest regards
        >
        > Frank Hauptle
        > http://www.gshop.com.au/
        > franki@...
        >
        > -----Original Message-----
        > From: Franki [mailto:frankieh@...]
        > Sent: Friday, 5 January 2001 3:18 PM
        > To: perl-beginner@egroups.com
        > Subject: [PBML] Dumb Question that is driving me nuts.
        >
        > Hi all,
        >
        > I am new and not terribly good a perl yet and I have a problem that is
        > making me pull my hair out.
        >
        > I have an auto config script that is supposed to offer a way for people to
        > configure another script via their browser.
        >
        > There is a section in this script that is supposed to add variables to a
        > config file, it looks like the following.
        >
        > print LOGFILE "$CHECKOUT_PATH\n
        >
        $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        >
        E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        >
        ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        >
        T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        > GOCART_FORM_COLOUR1\n" ;
        >
        > This just puts the values of the above variables in the file. Like so:
        >
        > /home/httpd/cgi-bin/checkout/
        > YourPassword
        > Your IP Address
        > E-Pay Server Address
        > franki@...
        > Mail Server IP Address.
        > http://www.yourdomain.com.au
        > TEST_SERVER
        > CHECKOUT
        > http://www.yourdomain.com.au/your_cart_address
        > http://www.yourdomain.com.au/images/title.jpg
        > My Stores Name
        > #008000
        > #008000
        > http://www.yourdomain.com.au/cgi-bin/checkout/GoCart.pl
        > http://www.yourdomain.com.au/cgi-bin/checkout/Checkout.pl
        > http://www.yourdomain.com.au/images/title.jpg
        > My Stores Name
        > #008000
        > #008000
        >
        > I need it to print out the following,. ( I'll just do it for the first
        one,
        > there is no need to do them all.)
        >
        > $CHECKOUT_PATH="/home/httpd/cgi-bin/checkout/"
        > I need it to print out as above instead of just the variables value.
        >
        > But no matter what I do, it doesn't print it out properly.
        >
        > Any anyone help me in how to setup the:
        >
        > print LOGFILE "$CHECKOUT_PATH\n
        >
        $HASHKEY_PASSWORD\n$IP_ADDRESS\n$SERVER_IP\n$ADMIN_EMAIL\n$MAIL_SERVER\n$SIT
        >
        E_ADDRESS\n$SERVER_TYPE\n$RETURN_POST\n$POST_URL\n$BANNER_ADDRESS\n$TITLE_NA
        >
        ME\n$BACKGROUND_COLOUR\n$TEXT_COLOUR\n$GO_CART_ADDRESS\n$POST_PATH_FOR_GOCAR
        >
        T\n$GOCART_BANNER_ADDRESS\n$GOCART_STORE_NAME\n$GOCART_BACKGROUND_COLOUR1\n$
        > GOCART_FORM_COLOUR1\n" ;
        >
        > line so that it prints out the lot in the correct format?
        >
        > Thankyou all,
        >
        > Kindest regards
        >
        > Frank Hauptle
        > http://www.gshop.com.au/
        > franki@...
        >
        > -----Original Message-----
        > From: Kul [mailto:aka.Kul@...]
        > Sent: Friday, 5 January 2001 3:00 PM
        > To: perl-beginner@egroups.com
        > Subject: Re: [PBML] Sendmail problem
        >
        > Hi Alan,
        > When I cut'n'pasted your first example and uploaded it to my server, it
        ran
        > straight away (after changing the email address and adding a print
        > content-type header).
        > Now for a dumb question: Have you got any scripts working before?
        > Are you sure that sendmail is in that location?
        > try locating sendmail via telnet/ssh etc ("whereis sendmail")
        > or if you dont have access to telnet/ssh, try this baby script:
        >
        > #!/bin/perl
        > print "Content-type: text/plain", "\n\n";
        > $sendmail =`whereis sendmail`;
        > @mailloc = split(" ", $sendmail);
        > foreach $loc (@mailloc)    {     print "$loc\n";    }
        >
        > Regards
        > Kul
        >
        > Alan Mackenzie wrote:
        >
        > > I have tried this mini e-mail script two ways and can't get it to send
        > > mail. The scripts check out under -c and -wc but don't send mail. Any
        > ideas
        > > what the problem is?
        > > (permissions are okay, digiweb site; Solaris system; Apache server)
        > >
        > > 1.
        > > #!/bin/perl
        > > $from_address = "asm\@...";
        > > $to_address = "asm\@...";
        > > $subject='test';
        > > $body='test sent 8:40';
        > > open(MAIL, "|/usr/lib/sendmail -oi -t") or die "Can't open sendmail:
        > $!\n";
        > > print MAIL <<"EOF";
        > > From: $from_address
        > > To: $to_address
        > > Subject: $subject
        > > sendmail worked
        > > $body
        > > EOF
        > > close(MAIL) or die $! ? "sendmail didn't close nicely: $!\n":
        > > "sendmail exit code $?";
        > >
        > > 2.
        > > #!/bin/perl
        > > $from_address="asm/@...";
        > > $to_address="alan/@...";
        > > $subject="test";
        > > $body="test sent 12:00";
        > > use Mail::Mailer;
        > >
        > > $mailer = Mail::Mailer->new();
        > > $mailer->open({ From => $from_address,
        > > To => $to_address,
        > > Subject => $subject,
        > > })
        > > or die "Can't open: $!\n";
        > > print $mailer $body;
        > > $mailer->close();
        > >
        > > =============================================
        > > ***** DEVELOPING AUTONOMY *****
        > > The 2nd CUE mini-conference
        > > @
        > > Shimizu, Shizuoka. May 12-13th 2001.
        > > Proposals deadline is January 25th 2001
        > > Need more information?
        > > http://www.wild-e.org/cue/conferences/autonomy.html
        > > or contact Eamon McCafferty eamon@...
        > >
        > > ============================================
        > > Alan Mackenzie
        > > CUE Coordinator
        > > College and University Educators Special Interest Group of
        > > JALT (the Japan Association for Language Teaching)





        ________________________________________________________________________
        ________________________________________________________________________

        Message: 25
           Date: Fri, 05 Jan 2001 08:19:02 -0000
           From: vineet@...
        Subject: Getting file attributes for a remote file

        Hi perl gurus,

        I am novice in perl.

        I wanted to get attributes (access time, last modified time) of a
        file that is residing on a remote machine.

        Using File::Remote module I can edit, modify or delete remote files
        but I cannot get the access time, last modified time, etc.

        stat does not work on remote file handles.

        I would be glad to recieve any suggestions.

        Thanks a ton,
        Vineet

        Sample piece of code:

        -----------------------------------
        #!/usr/bin/perl -w

        use File::Remote;

        my $remote = new File::Remote;
        $remote->open(FILE, '<remote machine:/home/vineet/replace.pl') or
        die "Open: $!\n";

        print "LAST MODIFIED DATE: ", scalar localtime((stat(FILE))[9]);
        $remote->close(FILE);
        ------------------------------------

        This displays the current time (which you get using 'date').





        ________________________________________________________________________
        ________________________________________________________________________


        =============================================
        ***** DEVELOPING AUTONOMY *****
        The 2nd CUE mini-conference
        @
        Shimizu, Shizuoka. May 12-13th 2001.
        Proposals deadline is January 25th 2001
        Need more information?
        http://www.wild-e.org/cue/conferences/autonomy.html
        or contact Eamon McCafferty eamon@...

        ============================================
        Alan Mackenzie
        CUE Coordinator
        College and University Educators Special Interest Group of
        JALT (the Japan Association for Language Teaching)
      Your message has been successfully submitted and would be delivered to recipients shortly.