Sorry..the actual tried coding is following,
#!/usr/bin/perl
use strict;
use warnings;
use Tie::File;
my ($Ltimestamp,$Lelapsed,$Lhost,$Ltype,$Lsize,$Lmethod,$Lurl,$Luser,
$Lhierarchy,$Lconttype);
my($name,$pos,$name1,$no,$tmp,$Ltimestamp1);
our $tmpp;
my $file="/file/path";
open(FH,"tmp.txt") ||
> http://search.cpan.org/
>
> Cheers!
>
> --Tom Phoenix
> Stonehenge Perl Training
>
Well of course! *laugh* funny how staring at a book for hours on end
addles the brain.
http://search.cpan.org/~jesse/HTTP-Server-Simple-0.27/lib/HTTP/Server/Simple.pm
seems to have what I want. it will t
Hi All,
I have one requirement, the file content is following, it is a dynamic
file,
1194240905.451105 127.0.4.56 TCP_MISS/200 2853 GET
cache_object://localhost/info - NONE/- text/plain
1194240905.452 0 127.0.0.1 TCP_MISS/200 2853 GET
cache_object://localhost/info - NONE/- text/plain
11
Writting a webserver by yourself is not so easy I have to say.
You must know well about http protocal handling and http connection status.
Lincoln Stein has made a simple web server in his book "network programming
with perl", you may take that as a reference.
-Original Message-
>From: W
On 11/6/07, Willy West <[EMAIL PROTECTED]> wrote:
> Anyway, I'd like to make a perl webserver as simply as possible so
> that I can play with dynamic web pages without configuring apache
> everywhere I go.. actually a webserver in a USB key would be fun :)
>
> I figured that I'd come here to see
just the simplest webserver one can imagine.
I made a POE web server a long time ago and it was fun. I've long
since lost that code.
Anyway, I'd like to make a perl webserver as simply as possible so
that I can play with dynamic web pages without configuring apache
everywhere I go.. actually a
I am posting this problem and the solution to spread the news a little
about a nasty bug in XP.
PROBLEM
I have a Perl (activestate) 5.8.8 script that uses IO::Socket::INET;
and opens a broadcast UDP socket. The packets are received
successfully by another host running a similar script as long as I
On Nov 6, 12:55 pm, [EMAIL PROTECTED] (Chas. Owens) wrote:
> On 11/6/07, Paul Lalli <[EMAIL PROTECTED]> wrote:
> snip> > my $filekey = $filekey.$sched_id;
>
> > This makes no sense. You're declaring a variable on the left and
> > assigning it to be a string that results in part from t
On Nov 6, 12:55 pm, [EMAIL PROTECTED] (Chas. Owens) wrote:
> On 11/6/07, Paul Lalli <[EMAIL PROTECTED]> wrote:
> snip> > my $filekey = $filekey.$sched_id;
>
> > This makes no sense. You're declaring a variable on the left and
> > assigning it to be a string that results in part from t
On 11/6/07, Ab <[EMAIL PROTECTED]> wrote:
snip
> Now, The thing I am trying to achieve is to call abhinav::test::test2
> on the runtime.
> ie, I am passing the value 'abhinav::test::test2' in a variable, and
> trying to exec in the code below, and this place I am failing.
> Can someone help me as t
On 11/6/07, Paul Lalli <[EMAIL PROTECTED]> wrote:
snip
> > my $filekey = $filekey.$sched_id;
>
> This makes no sense. You're declaring a variable on the left and
> assigning it to be a string that results in part from the
> concatenation of that variable on the right. When the right
On Nov 6, 9:36 am, [EMAIL PROTECTED] (Lawrence Statton) wrote:
> > I have a function in a lib that we use that has two referenced
> > hashes.
>
> No, you have a method in a class that has two referenced hashes.
> Computers are frustratingly pedantic, and mastering the art requires
> the same level
>
> No, you have a method in a class that has two referenced hashes.
> Computers are frustratingly pedantic, and mastering the art requires
> the same level of attention do detail at the human leve.
level.
And exceent prufreeding skils.
-
> I have a function in a lib that we use that has two referenced
> hashes.
No, you have a method in a class that has two referenced hashes.
Computers are frustratingly pedantic, and mastering the art requires
the same level of attention do detail at the human leve.
>
>
>
> my $zone = $se
On Nov 5, 7:45 pm, [EMAIL PROTECTED] (Beach Cruise) wrote:
> I have an interesting issue that I am not able to seem to get around.
>
> I have a function in a lib that we use that has two referenced
> hashes.
>
>
> my $zone = $self->{'zone'};
> my $params = $self->{'report-params'};
> my %zon
On Nov 6, 5:28 am, [EMAIL PROTECTED] (Sivasakthi) wrote:
> How to get the line before a last line from file??
Here's a few off the top of my head. I'm sure there's more.
#1
open my $fh, '<', $file or die $!;
my $before_last = (<$fh>)[-2];
#2
open my $fh, '<', $file or die $!;
my ($last, $before
On Tuesday 06 November 2007 00:40, Ab wrote:
> I have a package with the following contents.
> ---
> package abhinav::test;
>
> use strict;
> use warnings;
>
> sub test1
> {
> return "\nHello World";
> }
>
> sub test2
> {
> my ($include) = @_;
> foreach my $row (@$
On Tuesday 06 November 2007 00:24, Gunnar Hjalmarsson wrote:
> John W . Krahn wrote:
> > On Sunday 04 November 2007 18:06, Mike Martin wrote:
> >> sub run_cmd { return print
> >
> > print() returns either true or false. Why are you returning this
> > value from your sub?
> >
> >> span( { -class =>
I have an interesting issue that I am not able to seem to get around.
I have a function in a lib that we use that has two referenced
hashes.
my $zone = $self->{'zone'};
my $params = $self->{'report-params'};
my %zone_list = ();
$count = $zone->generate_zone_list(\%zone_list,\%params);
I have a package with the following contents.
---
package abhinav::test;
use strict;
use warnings;
sub test1
{
return "\nHello World";
}
sub test2
{
my ($include) = @_;
foreach my $row (@$include)
{
push (@$row, @$row[0] + 1
Hi All,
How to get the line before a last line from file??
Thanks,
Siva
sivasakthi wrote:
I have the text file as following,
this first line
this is the second line
this the third line
this is the fourth line
this is the sixth line
this is the seventh line
while opening and reading that text file, is it possible to get the byte
position of "this is the sixth line"
In case s.o. else will have the same problem.
Here's, how i solved it "my way":
[...]
# storage for APN data (multiple lines)
my %APNdata;
my @APNarray;
[...]
APNID PDPADDEQOSID VPAA PDPCHPDPTY PDPID
(?:[ ]+(\\d+)(?{\$APNdata{'APNID'} = \$^N;})[ ]+(\\d+)(?{\
$APNdata{'EQOS
John W . Krahn wrote:
On Sunday 04 November 2007 18:06, Mike Martin wrote:
sub run_cmd { return print
print() returns either true or false. Why are you returning this value
from your sub?
span( { -class => 'place_cmd' }, submit( -name => 'action',
-value => shift ) ), p };
...
run_cmd(
24 matches
Mail list logo