You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by ma...@maxcalvo.net on 2002/12/23 13:46:47 UTC
my little stupid script
Howdy;
I am in the beginning stages to get mod_perl in my head. This is my second
script after the "Hello There" script. I am trying ot get my little stupid
script to work. What I am trying ot do is fairly simple; I thought. I am
just trying to get the server to print the numbers from 1 to 10. Here is the
script that I have been working for 5 days. Please help and thank you in
advnaced.
#!/user/bin/perl -w
use strict;
my $r = shift;
$r->send_http_header('text/plain');
for (my $i = 0 ; $i > 10; $i++) {
print "$i\n";
}
1;
thanks
-max
Re: my little stupid script
Posted by ma...@maxcalvo.net.
Honza Pazdziora writes:
> On Mon, Dec 23, 2002 at 02:34:52PM -0500, darren chamberlain wrote:
>> * max.calvo@maxcalvo.net <ma...@maxcalvo.net> [2002-12-23 14:31]:
>> > I am in the beginning stages to get mod_perl in my head. This is my second
>> > script after the "Hello There" script. I am trying ot get my little stupid
>> > script to work. What I am trying ot do is fairly simple; I thought. I am
>> > just trying to get the server to print the numbers from 1 to 10. Here is
>> > the script that I have been working for 5 days. Please help and thank you
>> > in advnaced.
>> >
>> >
>> > #!/user/bin/perl -w
>> usr?
>>
>> > use strict;
>> >
>> > my $r = shift;
>
> But first of all the question is if this code is run in an environment
> where this shift will return Apache->request object.
>
> --
> ------------------------------------------------------------------------
> Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
> ... all of these signs saying sorry but we're closed ...
> ------------------------------------------------------------------------
Thank you all. I got it working. And yes I am using Apache:Registry for my
server configuration. The problem was with the logic in the 'for loop'.
Thank you all again
-Max
Re: my little stupid script
Posted by Honza Pazdziora <ad...@informatics.muni.cz>.
On Mon, Dec 23, 2002 at 02:34:52PM -0500, darren chamberlain wrote:
> * max.calvo@maxcalvo.net <ma...@maxcalvo.net> [2002-12-23 14:31]:
> > I am in the beginning stages to get mod_perl in my head. This is my second
> > script after the "Hello There" script. I am trying ot get my little stupid
> > script to work. What I am trying ot do is fairly simple; I thought. I am
> > just trying to get the server to print the numbers from 1 to 10. Here is
> > the script that I have been working for 5 days. Please help and thank you
> > in advnaced.
> >
> >
> > #!/user/bin/perl -w
> usr?
>
> > use strict;
> >
> > my $r = shift;
But first of all the question is if this code is run in an environment
where this shift will return Apache->request object.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
... all of these signs saying sorry but we're closed ...
------------------------------------------------------------------------
Re: my little stupid script
Posted by darren chamberlain <dl...@users.sourceforge.net>.
* max.calvo@maxcalvo.net <ma...@maxcalvo.net> [2002-12-23 14:31]:
> I am in the beginning stages to get mod_perl in my head. This is my second
> script after the "Hello There" script. I am trying ot get my little stupid
> script to work. What I am trying ot do is fairly simple; I thought. I am
> just trying to get the server to print the numbers from 1 to 10. Here is
> the script that I have been working for 5 days. Please help and thank you
> in advnaced.
>
>
> #!/user/bin/perl -w
usr?
> use strict;
>
> my $r = shift;
>
> $r->send_http_header('text/plain');
>
> for (my $i = 0 ; $i > 10; $i++) {
^
Do you mean < here? -'
> print "$i\n";
> }
> 1;
(darren)
--
The first rule of magic is simple. Don't waste your time waving your
hands and hoping when a rock or a club will do.
-- McCloctnik the Lucid