Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Variable being saved as a list?

by Monk::Thomas (Friar)
on Aug 07, 2014 at 10:23 UTC ( [id://1096586]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open (REFFILE,"$reffile") || print "Content-type: text/html\n\n Can't 
    +Open $reffile(r): $!\n";
    my(@LINES)=<REFFILE>;
    ...
    $SIZE=@LINES;
    open (REFFILE,">$reffile") || print "Content-type: text/html\n\n Can't
    + Open $reffile(r): $!\n";
    print REFFILE "$date\| $ENV{'REMOTE_HOST'}\| $ENV{'HTTP_USER_AGENT'}\|
    +$FORM{'discnt'}\|$FORM{'shipcountry'}\|\n";
    
  2. or download this
    my $htmlheader = "Content-type: text/html\n\n";
    open (REFFILE, '<', $reffile) || print "$htmlheader Can't Open $reffil
    +e(r): $!\n";
    [...]
    open (REFFILE, '>', $reffile) || print "$htmlheader Can't Open $reffil
    +e(r): $!\n";
    
  3. or download this
    close(REFFILE)
      || print "$htmlheader Can't close filehandle for $reffile(r): $!\n";
    [...]
    print (REFFILE "$date\| $ENV{'REMOTE_HOST'}\| $ENV{'HTTP_USER_AGENT'}\
    +|$FORM{'discnt'}\|$FORM{'shipcountry'}\|\n")
      || "$htmlheader Can't write to $reffile(r): $!\n";
    
  4. or download this
    my $htmlheader = "Content-type: text/html\n\n";
    open REFFILE, '<', $reffile
    ...
      or print "$htmlheader Can't Open $reffile(r): $!\n";
    print REFFILE "$date\| $ENV{'REMOTE_HOST'}\| $ENV{'HTTP_USER_AGENT'}\|
    +$FORM{'discnt'}\|$FORM{'shipcountry'}\|\n"
      or "$htmlheader Can't write to $reffile(r): $!\n";;
    
  5. or download this
    my $htmlheader = "Content-type: text/html\n\n";
    open my $fh_read, '<', $reffile
    ...
      or print "$htmlheader Can't Open $reffile(r): $!\n";
    print {$fh_write} "$date\| $ENV{'REMOTE_HOST'}\| $ENV{'HTTP_USER_AGENT
    +'}\|$FORM{'discnt'}\|$FORM{'shipcountry'}\|\n"
      or "$htmlheader Can't write to $reffile(r): $!\n";
    
  6. or download this
    my $shipcountry;
    # shipcountry may contain letters, digits, underscores, spaces and das
    +hes
    ...
    }
    print {$fh_write} "$date\| $ENV{'REMOTE_HOST'}\| $ENV{'HTTP_USER_AGENT
    +'}\|$FORM{'discnt'}\|$shipcountry\|\n"
      or "$htmlheader Can't write to $reffile(r): $!\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1096586]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found