|
|
Up |
|
|
  |
Author: Joe SmithJoe Smith
Date: Jul 13, 2008 01:28
Louis wrote:
> I appreciate any comment or suggestion...
>
> I use ajax/php/mysql quite a bit, and it works great. I am now working
> in a different configuration, where there is no php and mysql installed,
> if I want to use ajax, I have to make use of perl on the web server.
>
> Herein my question, how do you make perl return data instead of a web
> page? Apparently the web server, whatever it is, called perl per my
> instruction but the data returned by the server is a web page. All I
> want perl to return data to my javascript so I can process the data.
The initial http request returns a web page, and is done with it.
Then javascript opens another TCP connection to get its data.
That's how javascript can load multiple images into a document.
Although with multipart/mime, a single http transaction can return
html and multiple streams of data.
-Joe
|
| |
|
| |
no comments
|
|
  |
Author: LouisLouis
Date: Jul 6, 2008 23:29
I appreciate any comment or suggestion...
I use ajax/php/mysql quite a bit, and it works great. I am now working
in a different configuration, where there is no php and mysql installed,
if I want to use ajax, I have to make use of perl on the web server.
Herein my question, how do you make perl return data instead of a web
page? Apparently the web server, whatever it is, called perl per my
instruction but the data returned by the server is a web page. All I
want perl to return data to my javascript so I can process the data.
If the data returned is a web page, the javascript has no way to get its
hand on the data.
Am I doing something wrong? Or I am not doing it right?
Please comment. Thank you.
|
| |
|
| |
no comments
|
|
  |
Author: onlinevieweronlineviewer
Date: Jul 2, 2008 18:02
Hello All,
I am trying to run a tcpdump and have perl kill the tcpdump once 10
files have
been created by the tcpdump. Here is my code, not sure...if my logic
is screwy Thanks,
system "tcpdump -i bge1 -s0 -w /tmp/file.out -C 1"; sleep 2;
while(true){
@array1 = `ls -l /tmp | grep files`;
$result=@array1+1;
|
| Show full article (0.74Kb) |
|
no comments
|
|
  |
Author: kvnsmnsnkvnsmnsn
Date: Jun 30, 2008 15:14
I recently ran a Perl script on my Windows Vista Enterprise machine
that appeared to go into an infinite loop. After it sat there for a
while apparently not doing anything I killed the window it was running
in.
Now I can't run that program any more, nor can I run any program that
pipes the command's output into a file handle. For example, I
wrote the very simple Perl script:
open( DIR_OTPT, "dir Drctry |");
print "Before.\n";
local @drFiles = ;
print "After.\n";
for $fileLine (@drFiles)
{ chomp( $fileLine);
print "[$fileLine]\n";
}
close( DIR_OTPT);
|
| Show full article (1.35Kb) |
|
2 Comments |
|
  |
Author: swiltingswilting
Date: Jun 11, 2008 04:03
i dont understand my script doesnt execute in apache
perl -c script.pl
syntax ok
perl script.pl
i reponse cool html
#!/usr/bin/perl -w
use diagnostics;
use warnings;
use strict;
use CGI qw(:standard escapeHTML);
use CGI::Carp qw(fatalsToBrowser);
use Net::SMTP;
##use FileHandle;
use File::Copy;
use constant LONGUEUR_MAX => 5_000;
my $cgi;
my $key;
my %%etats;
my $ecran_actuel;
|
| Show full article (3.03Kb) |
|
no comments
|
|
  |
Author: Hobart DuncanHobart Duncan
Date: Jun 1, 2008 11:41
A question for the perl gurus......
When an array is created.... let's say:
10 = @test
.... this will create the array "test" with a length of 10 elements within
the array indexed as (0-9).
Is this an absolute length? ... or is it's length automatically incremented with
a push?.... In other words.....
What happens if I "push" a value onto this list?.... will the new value replace
the [9] content and roll the [0] content off the list or will the new value be
given an index of [10] automatically increasing the desired length of 10 total
values within the array. From what I've read, so far, is that to create a
rotating list I must shift the first element off prior to pushing the newest
element onto the list.
I'm trying to learn perl by reading other's scripts and have found, what I
believe is a problem, in a script. They are pushing a value onto a list that is
designed to be ALWAYS 10 elements in length prior to shifting the oldest
element off.....
This is probably an easy question..... but I've yet to find an answer on the
net.
|
| Show full article (1.07Kb) |
|
1 Comment |
|
  |
Author: wolfpack307wolfpack307
Date: Apr 7, 2008 18:14
Hi all,
I am writing a perl script to parse a file. The data in the file is
seperated by space/tab. However, certain fields may be empty or
consist of mutiple words and are double quoted and this makes it
difficut for me to do a split.
Example of data:
"" "This is 2nd field"
3 4
1 2
"" 4
1 2 "The field may consist of (meta)
characters" ""
|
| Show full article (1.53Kb) |
|
1 Comment |
|
  |
|
|
  |
|
|
  |
|
|
  |
Author: Shawn BeasleyShawn Beasley
Date: Mar 28, 2008 02:11
Is this a new list? Why is it so empty? Can someone tell me where I can
find some help with activestate for windows? Thanks in advance.
--Shawn
|
| |
|
3 Comments |
|
|
|
|
|
|