## SET-COOKIE.cgi ##
#!/usr/bin/perl
use CGI qw/:standard/;
use CGI::Cookie;
use CGI::Carp qw(fatalsToBrowser);
use strict;
use warnings;
my $c = new CGI::Cookie(-name = 'ID',
-value = '987654321',
-domain = '.domain.com',
-expires = '+3M',
-path = '/'
);
## READ-COOKIE.CGI ###
#!/usr/bin/perl
use CGI;
use CGI::Cookie;
use CGI::Carp qw(fatalsToBrowser);
use strict;
use warnings;
my %cookies =3D fetch CGI::Cookie;
my $cookies;
my $id =3D $cookies{'ID'}-value;
IF the cookie already
Sara == Sara [EMAIL PROTECTED] writes:
Sara IF the cookie already exists the script reads the value
Sara perfectly, but if cookie doesn't exist or I mean for the first
Sara time visitor, it gives error: Can't call method value on an
Sara undefined value
Ahh, the classic cookie
On 29 Mar, David Garamond wrote:
Am I right to think that CGI::Session::File driver is insecure? It
creates the session files with a hardcoded 0644 permission, while the
synopsis/examples tell us to store the files in /tmp.
You're right, the chmod mode is hard-coded.
Do we desire a patch?
OK I need to parse a rather large logfile and delete specific lines.
The file is called logfile and is simply a large text file.
Is there some simple way to read in the file and delete specific lines
that contain DSL:[EMAIL PROTECTED] and the rerun the process to delete
[EMAIL PROTECTED] -or-
Hi Greg.
Its easy, just take:
#
#!/usr/bin/perl
$file = logfile;
$file_tmp =tmp;
$a = DSL;
$b=No such user;
open (INPUT, $file) || die (Could not open file: $!\n);
open (OUTPUT, $file_tmp ) || die (Could not open file: $!\n);
while (INPUT) {