Re: Check POP3 E-mail

From: krakle (krakle_at_visto.com)
Date: 11/06/04


Date: 6 Nov 2004 07:50:28 -0800

Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in message news:<2v1k72F2ev3dmU1@uni-berlin.de>...
> krakle wrote:
> > "A. Sinan Unur" wrote:
> >> krakle@visto.com (krakle) wrote:
> >>>
> >>> How about for resetting purposes in mod_perl?
> >>
> >> Care to show what you mean by giving us some code?
> >>
> >> Please note that I have a pretty good idea what you might be
> >> referring to, but it is your job to actually _make_ an argument
> >> (using code, since this is a programming newsgroup) for the point
> >> you are trying to make.
> >
> > Since you insist on seeing code for whatever unknown reason before
> > you answer my question (ignorance). I'll show you some...
> >
> > _WITHOUT resetting variable_
> >
> > use CGI;
> > my $cgi = new CGI;
> >
> > my @message;
> >
> > if (some_other_yada) {
> > push (@message, "This is message #1: $cgi->param('msg1')");
> > }
> >
> > if (some_other_yada) {
> > push (@message, "Now this is message 2: $cgi->param('msg2')");
> > }
> >
> > if (@message) {
> > foreach (@message) { print "$_\n" }
> > } else {
> print "No messages";
> > }
>
> Did you run that code? Apparently not, since it doesn't even compile
> (under strict). Consequently, it does not serve the purpose of
> illustrating anything.

some_other_yada ISNT a Perl function or sub-routine. I'm not going to
write an entire Perl script to make a point in one single thread in
usenet when you guys know what i'm talking about. And YES this code
serves a purpose.

The purpose is @message will retain ALL data added to the array in
memory unless it is reset when you run under mod_perl.

The POINT is

my @message = ();

ISN'T bad syntax. I consider it proper.

>
> > If ran as a CGI everything works fine... HOWEVER, if ran as mod_perl
> > @message retains the previous users data then the new users data adds
> > to the array then the next users data will retain the last 2 users
> > and so on... So Even if the current users session never had any
> > "messages" to add @message will not be empty. BUT if you used
> >
> > my @message = ();
> >
> > just like the original poster used the array woudl be reset at the
> > start of the script emptying any data left over from the previous
> > session.
>
> As I explained in another message in this thread, your theory is
> incorrect, and if you had written real code and run it, you'd have found
> out for yourself.

It ISN'T incorrect at all. Have you even used mod_perl??? It keeps the
scripts in memory. And a global variable that does NOT reset it self
or assign itsself a value immediatly before an action will retain the
pervious sessions data.

Wow I can't believe the people here...



Relevant Pages

  • Reading a file more than once in a shell script
    ... a shell script. ... easier to understand if you look at the script: ... "reset" the SOURCE_FILE? ... and then the rest of the output is incorrect. ...
    (comp.unix.shell)
  • Re: Error handling problem.
    ... The script appears to be working fine, ... >a problem with the error handling. ... The Err object is implemented in scope-specific manner. ... will implicitly clear (reset) any error settings. ...
    (microsoft.public.windows.server.scripting)
  • Re: Cumulative Bandwidth limits under Windows 2000 WMS
    ... Simple script which will deny new connections if the ... number of bytes exceeded certain limit since last reset. ...
    (microsoft.public.windowsmedia.server)
  • Re: Error handling problem.
    ... >>administrator password for the local machine account of all of the ... The script appears to be working fine, ... > The Err object is implemented in scope-specific manner. ... > will implicitly clear (reset) any error settings. ...
    (microsoft.public.windows.server.scripting)
  • Reset Expired Password
    ... I'd like to have a script (which will eventually run via ... Active Directory. ... reset password at next login, the script won't bind to ...
    (microsoft.public.windows.server.scripting)