On Wed, Dec 12, 2012 at 12:16 PM, Andy Bach wrote:
> I used a temp var as you had ("$cookie"), but in this case, using the
> default while usage assings directly to $_:
> while ( <> ) {
> if ( $_ eq 'cookie') {
>
"assigns directly to $_"
> and that gets easier with regular expressio
On Tue, Dec 11, 2012 at 3:47 PM, Alex Ahn wrote:
> I have a problem with a certain script, as a beginner.
>
#!/usr/bin/perl -w
#
# Cookie Monster
use strict;
print 'Give me a cookie (q to quit): ';
while ( my $cookie = <> ) {
chomp($cookie);
if ( $cookie eq 'cookie') {
On Tue, Dec 11, 2012 at 9:41 PM, Alex Ahn wrote:
> Thank you all for the input on how to resolve to problem with the second
> loop.
Not sure if this is what you're working towards, but the problem of prompt
and response is always a design decision - when you are looking to make a
multiple promp
Before your 2nd while loop, add:
$cookie = "";
> I have a problem with a certain script, as a beginner.
>
> #!/usr/bin/perl -w
> #
> # Cookie Monster
>
> $cookie = "";
>
> while ( $cookie ne 'cookie') {
> print 'Give me a cookie: ';
> chomp($cookie = );
> }
>
> print "Mmmm. Cookie.\n";
>
> whil
Thank you all for the input on how to resolve to problem with the second
loop.
Alex
On 12/11/2012 5:00 PM, Shawn H Corey wrote:
On Tue, 11 Dec 2012 16:47:15 -0500
Alex Ahn wrote:
I have a problem with a certain script, as a beginner.
#!/usr/bin/perl -w
#
# Cookie Monster
$cookie = "";
whi
Hi,
On Tue, Dec 11, 2012 at 10:47 PM, Alex Ahn wrote:
> I have a problem with a certain script, as a beginner.
>
> #!/usr/bin/perl -w
> #
> # Cookie Monster
>
> $cookie = "";
>
> while ( $cookie ne 'cookie') {
> print 'Give me a cookie: ';
> chomp($cookie = );
> }
>
> print "Mmmm. Cookie.\n";
>
On Tue, 11 Dec 2012 16:47:15 -0500
Alex Ahn wrote:
> I have a problem with a certain script, as a beginner.
>
> #!/usr/bin/perl -w
> #
> # Cookie Monster
>
> $cookie = "";
>
> while ( $cookie ne 'cookie') {
> print 'Give me a cookie: ';
> chomp($cookie = );
> }
>
> print "Mmmm. Cookie.\n";
>
[mailto:[EMAIL PROTECTED]
Sent: Thursday, November 17, 2005 1:15 AM
To: S, karthik (IE03x)
Cc: [EMAIL PROTECTED]; Perl Beginners List
Subject: Re: cookies
On 11/16/05, S, karthik (IE03x) <[EMAIL PROTECTED]> wrote:
I know that there are many template systems and modules available to imp
Thanks buddy, I am clear with it now.
With Best Regards,
Karthikeyan S
-Original Message-
From: JupiterHost.Net [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 16, 2005 11:42 PM
To: beginners@perl.org
Subject: Re: cookies
Hello,
> # animal is an existing cookie with value
;
>
>
>
> .
>
> # Question : Now what does $animal_new contain?
>
> .
>
>
>
> print header;
>
>
>
> my $animal_very_new = cookie('animal');
>
>
>
> .
>
> # Question : Also, what does $animal_very_new contain?
&
Hello,
# animal is an existing cookie with value as 'lion'
my $animal = cookie('animal');
# now $animal gets 'lion'
# now assign 'tiger' to animal
my $cookiereplace = "Set-Cookie: animal = tiger;\n";
print $cookiereplace
# assignment done
my $animal_new = cookie('animal');
-Original Message-
From: Chris Devers [mailto:[EMAIL PROTECTED]
Sent: Monday, November 14, 2005 8:36 PM
To: S, karthik (IE03x)
Cc: Perl Beginners List
Subject: RE: cookies
On Mon, 14 Nov 2005, S, karthik (IE03x) wrote:
> my $username = 'name';
> my $cookiereplace
On Mon, 14 Nov 2005, S, karthik (IE03x) wrote:
> my $username = 'name';
> my $cookiereplace = "Set-Cookie: username=$username; expires= \n";
> print $cookiereplace
>
> print header;
>
> #print htmls
>
>
> To unset the cookie :
>
> my $cookiereplace = "Set-Cookie: username='';";
Okay,
ve received this e-mail in
error, please immediately notify me and permanently delete the original
and any copy of any e-mail and any printout thereof.
-Original Message-
From: Chris Devers [mailto:[EMAIL PROTECTED]
Sent: Monday, November 14, 2005 5:45 PM
To: S, karthik (IE03x)
Cc: beginners@p
On Mon, 14 Nov 2005, S, karthik (IE03x) wrote:
> Could some one help me out by explaining how to "set" and "delete" a
> cookie using perl...
Probably.
Can you help us out by showing us what code you've tried so far, &/or
what documentation you've read so far?
Give us a hint that you've at leas
A Taylor <[EMAIL PROTECTED]> wrote:
: Hi all,
: I have a problem that I am hoping someone can shed some
: light on. I have written a cookie in perl and what I want
: to do is read the cookie back but in an asp script. I can
: read the cookie back in other perl scripts but the asp
: script doesnt s
Have you read the ebook beginning perl?
I downloaded it but I don't have the url. Sorry.
Try google with 'ebook beginning perl'
On Wed, 13 Aug 2003 16:44:59 +0100, "Mace, Richard" <[EMAIL PROTECTED]> wrote:
> I want to start using cookies to store user session information and build associated
> privileges on
> web pages. I'm starting as a complete novice in this field, has
--On Wednesday, August 13, 2003 4:44 PM +0100 "Mace, Richard"
<[EMAIL PROTECTED]> wrote:
I want to start using cookies to store user session information and build
associated privileges on web pages. I'm starting as a complete novice in
this field, has anyone else got off to a flyer using a book o
hat a submit() would send the msg on it's way...
Thanks you so much
aman
-Original Message-
From: Todd Wade [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 11:02 PM
To: [EMAIL PROTECTED]
Subject: Re: Cookies rejected
"Aman Thind" <[EMAIL PROTECTED]> w
"Aman Thind" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi All
>
> On receiving no reply to my previous post, I myself struggled a bit and
came
> up with the following code to login to the site :
>
> --
> use LWP::UserA
are the only
option.
Cheers
Nigel
> -Original Message-
> From: R. Joseph Newton [mailto:[EMAIL PROTECTED]
> Sent: 27 February 2003 23:34
> To: Nigel Peck - MIS Web Design
> Cc: CGI List; [EMAIL PROTECTED]
> Subject: Re: Cookies, CGI
>
>
> Nigel Peck - MIS Web
ond script but
Mozilla doesn't.
Cheers for the advice I'll look that one up.
Nigel
> -Original Message-
> From: Dan Muey [mailto:[EMAIL PROTECTED]
> Sent: 27 February 2003 23:49
> To: R. Joseph Newton; Nigel Peck - MIS Web Design
> Cc: CGI List; [EMAIL PROTECTED]
&g
> > I'm trying to set a cookie and have it returned to the
> script before
> > the user has to visit another page.
> >
> > I'm currently doing it like this:
> >
> > Original Cookie already set
> > User request -> Script returns Set-cookie and Refresh to
> second script
> > Second script called
Nigel Peck - MIS Web Design wrote:
> I'm trying to set a cookie and have it returned to the script before the
> user has to visit another page.
>
> I'm currently doing it like this:
>
> Original Cookie already set
> User request -> Script returns Set-cookie and Refresh to second script
> Second sc
Try CGI::Cookie
Dan
> -Original Message-
> From: Nigel Peck - MIS Web Design [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 27, 2003 6:18 AM
> To: CGI List; [EMAIL PROTECTED]
> Subject: Cookies, CGI
>
>
> I'm trying to set a cookie and have it returned to the script
> before the
Hi Aman,
I've had exactly the same problem. I strongly suspect it's an IE thing.
I've not found a way round it other than looking at the HTTP_REFERER and
removing cookies from pages that had not come from my site.
R
-Original Message-
From: aman cgiperl [mailto:[EMAIL PROTECTED]]
S
On Wednesday, October 2, 2002, at 08:26 AM, aman cgiperl wrote:
> I am not using CGI.pm
I don't mean to be offensive here, but why would you not use a standard
Perl module that's only purpose is to make coding CGI easier?!
James
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional c
> -Original Message-
> From: david [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 03, 2002 2:51 PM
> To: [EMAIL PROTECTED]
> Subject: RE: cookies and baking in general :)
>
>
> Bob Showalter wrote:
>
> >> -Original Message-
>
Bob Showalter wrote:
>> -Original Message-
>> From: david [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, September 03, 2002 1:24 PM
>> To: [EMAIL PROTECTED]
>> Subject: Re: cookies and baking in general :)
>>
>>
>> there are
>> coo
> -Original Message-
> From: david [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 03, 2002 1:24 PM
> To: [EMAIL PROTECTED]
> Subject: Re: cookies and baking in general :)
>
>
> there are
> cookie blocking
> software out there that sets between a
depends on the needs of your application. generally, don't rely on the user
to use your page in a certain order. instead assume that he/she will use
your page in random order. the problem of force user to use your
page in a certain order is not very reliable. a user can always have
multiple wi
> Is there a way to check if the person accepts cookies?
>
> thanks.
> M
You just set one on one page and test whether it's set on the next
one.
Jenda
=== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
There is a reason for living. There must be. I've seen it somewhere.
It's
ds,
Connie
- Original Message -
From: "bob ackerman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 06, 2002 5:57 AM
Subject: Re: cookies
>
> On Friday, July 5, 2002, at 02:32 PM, Connie Chan wrote:
>
> > Try Cookies.pm,
> >
Are you checking from a web page, or do you just want to check a machine?
Also, what platforms are you using? I would guess that if you're checking
from a web page, then the easiest way to be sure would be to make a cookie.
-Original Message-
From: Mariusz [mailto:[EMAIL PROTECTED]]
Sen
On Friday, July 5, 2002, at 02:32 PM, Connie Chan wrote:
> Try Cookies.pm,
> $cookie_jar->accept_cookies($bool);
> document at
> http://search.cpan.org/doc/ILYAM/HTTP-
> WebTest-1.99_07/lib/HTTP/WebTest/Cooki
> es.pm
accept_cookies($optional_accept_cookies)
Enables or disables receipt of cooki
Try Cookies.pm,
$cookie_jar->accept_cookies($bool);
document at
http://search.cpan.org/doc/ILYAM/HTTP-WebTest-1.99_07/lib/HTTP/WebTest/Cooki
es.pm
- Original Message -
From: "Mariusz" <[EMAIL PROTECTED]>
To: "perl" <[EMAIL PROTECTED]>
Sent: Saturday, July 06, 2002 4:13 AM
Subject: cooki
On Sun, Mar 03, 2002 at 07:20:35AM -0500, [EMAIL PROTECTED] wrote:
> Could someone tell me why this doesn't retrieve my cookie?
> use CGI param, header,cookie;
> print header();
> print header(-cookie=>'MY_COOKIE');
header() is for generating an http header, not for reading from it.
print cookie(
fixed. i looked in browser prefs and saw that 'path' for the cookie was to
the file that created it.
i added-path='/'when creating the cookie and it works.
saw dozens of posts with problems retrieving cookies, but didn't see
anyone mentioned that gotcha.
--
To unsubscribe, e-mail: [E
On Wed, May 09, 2001 at 02:48:54PM -0400, Casey West wrote:
: On Wed, May 09, 2001 at 03:45:40PM -0400, Brian Shoemaker wrote:
: : I'm having trouble getting a script to set a cookie.
: :
: : It works when I type the URL of the script into the browser and press
: : enter.. it works that's way
Cookies are set in the HTTP header portion of the HTML response. When you
run you include your script within the page, the HTTP header has already
been sent.
You need to set the cookie as a standalone page (though you can get cookies
in included scripts)
--A
-Original Message-
From:
On Wed, 9 May 2001, Brian Shoemaker wrote:
> I'm having trouble getting a script to set a cookie.
>
> It works when I type the URL of the script into the browser and press
> enter.. it works that's way and a cookie is set.
>
> But when I place that script in a HTML page like this
>
> the coo
Heya Jeff,
You might consider HTTP::Cookies. You can use it with LWP by telling
the useragent to use a new cookie object to grab cookies from the HTML
headers. You'll get a lot more from perldoc HTTP::Cookies, but
following is an example,
Cheers,
C.J.
#!/usr/bin/perl -w
use strict;
u
Jeff K.V. Bhavnanie writes ..
>How do i go about accepting a cookie from a web login site?
in a cookie jar
>I use LWP to do a POST, but i can't login as the server
>sends a cookie. Is there a generic Login perl script lines?
>
>Login to a web site, send username password, accept cookie
>then th
44 matches
Mail list logo