All,
My script goes like this...
--
#!/usr/bin/perl
print Content-type: text/html\n\n;
$cmd = cat file_one;
$content = qx!$cmd!;
print $content;
--
I have a case where file_one is not in the same directory. So I give the
Not sure this is the problem, but remember that when you run a CGI
script from the command line, you are running as yourself. When you
run it in the browser, you are running under whatever username and
group the server is running with (and almost always this is different
from yourself). So,
All,
I am trying to print the output of grep command through cgi.
When I do grep on a specific file I get the desired output, but while I try
something like
grep -Ri pattern ../directoryname/
I get no output when I run cgi(browser) though I get the output correctly run
in commandline (perl).
TapasranjanMohapatra wrote:
All,
My script goes like this...
--
#!/usr/bin/perl
print Content-type: text/html\n\n;
$cmd = cat file_one;
$content = qx!$cmd!;
print $content;
--
You should not shell out to read a file,
Hi ,
I need to develop/ migrate my exsiting wap site perl / perl cgi .
Can i find proper tutorials on the NET ?
Can someone give me proper URLS's ?
and Where can i buy relavant Books ?
Thank u ,
chandana
All,
My script goes like this...
--
#!/usr/bin/perl
print Content-type: text/html\n\n;
$cmd = cat file_one;
$content = qx!$cmd!;
print $content;
--
I have a case where file_one is not in the same directory. So I
Dear Charles,
The rules are as follows:
1. The first tag should be src (single tag)
2 . The second tag should be mkt (single tag)
3. The third tag should fil (may be multiple fil tags)
4. The fourth tag should be pub (single tag)
5. The fifth tag should be cat (single tag)
6. Next, the set of 4
Hi Robert
Am Montag, 25. April 2005 01.45 schrieb Robert Kerry:
I want to use Perl to extract keywords from plaintext, don't know
whether there are some exsiting package / algorithm for doing that?
Thank you.
In the case you know the keywords
(I suppose so, otherwise you would search words,
Hi Graeme
[rearranged from bottom:]
All I want to do is print off the value of the hash refs at the moment
before I start building on it.
Due to my bad english I'm not quite shure what you mean by that.
You want to print the values to be sure they are right, before using them?
I know I'm
I'm trying to write a perl one-liner that will edit an iCalendar
format file to remove To Do items. The file contains several
thousand lines, and I need to remove several multi-line blocks. The
blocks to remove start with a line BEGIN:VTODO (without the quotes)
and end with a line END:VTODO
Hi Kevin
just hints, no solution :-)
Am Montag, 25. April 2005 12.59 schrieb Kevin Horton:
I'm trying to write a perl one-liner that will edit an iCalendar
format file to remove To Do items. The file contains several
thousand lines, and I need to remove several multi-line blocks. The
I wish to read input from a user that has multiple lines with carriage
returns from stdin but not actually stop reading until a single # on a
line by itself. Is there a module / package / function that will aid in
this? I would like to do something like below:
Until(STDIN = #) {
Hello,
Thanks a lot Teddy ,Chris ,Brian and Ashoka for letting me know such a wide
scope of perl. Just one more enquiry...hope you guys won't mind.
Right now i am reading the book Learning Perl.
After going through this book I am intending to read Perl Cookbook ,would
it be right ? Or, shall I
[EMAIL PROTECTED] wrote:
I wish to read input from a user that has multiple lines with carriage
returns from stdin but not actually stop reading until a single #
on a line by itself.
You can use perl's $/ variable to define an record separator. The default is
\n, but you can change it.
Try
On 4/24/05, Tommy Nordgren wrote:
I wan't links to any useful tools for generating configure scripts in
perl.
That is, tools to automatically generate the configure script for
open-source
C/C++ projects.
Perl itself uses a Configure script generated using the metaconfig
tool, which is (as
Hello,
Can somebody explain me the magic here
=
sub vprint (@) {
return unless $Utils::verbose;
my ($file, $line) = (caller)[1,2];
my $subr = (caller 1)[3] || 'main';
$file =~ s!.*/!!;
print STDERR $subr($file:$line): , @_;
}
What
On 4/25/05, John W. Krahn [EMAIL PROTECTED] wrote:
Owen wrote:
I found a message from Randal Schwartz, Message-ID:
[EMAIL PROTECTED]#1/1
which gave a regular expression for a valid Unix name,
/^(?=.*?\D)[a-z\d]+$/
That works but why does it work?
/
^
On 4/25/05, Manish Sapariya [EMAIL PROTECTED] wrote:
Hello,
Can somebody explain me the magic here
sub vprint (@) {
# subroutine declaration with prototype
return unless $Utils::verbose;
# exit sub unless $Utils::verbose flag is set
my ($file, $line) =
I'm trying to write a perl one-liner that will edit an iCalendar
format file to remove To Do items. The file contains several
thousand lines, and I need to remove several multi-line blocks. The
blocks to remove start with a line BEGIN:VTODO (without the quotes)
and end with a line END:VTODO
Siegfried Heintze wrote:
I'm trying to screen scape some information off the web.
I anticipate that I'll want to have it multi-threaded.
As per Lincoln Stein's book, I'm using HTML::Parser and passing a function
pointer (you can tell I'm a C programmer) to $parser-handler(start=
\start,
Hi Perlers,
I typically will type the following to collect a specific column of
data from some command's output:
# some_command | awk '{print $4}'
I wanted to start using perl one-liners more often, so I thought I'd
try the column thing first. This is what I came up with:
#
On 4/25/05, Larsen, Errin M HMMA/IT [EMAIL PROTECTED] wrote:
Hi Perlers,
I typically will type the following to collect a specific column of
data from some command's output:
# some_command | awk '{print $4}'
I wanted to start using perl one-liners more often, so I thought I'd
try
I changed the web.xml file and the .jar suffix as required, and create
a new directory WEB-INF/cgi/ under webapps/ directory, I put my
first.pl into that directory, and try to visit it using
http://localhost:8080/cgi/first.pl but it doesn't work. I've also
tried /cgi-bin/first.pl and something
On 4/25/05, Jay Savage [EMAIL PROTECTED] wrote:
On 4/25/05, Larsen, Errin M HMMA/IT [EMAIL PROTECTED] wrote:
Hi Perlers,
I typically will type the following to collect a specific column of
data from some command's output:
# some_command | awk '{print $4}'
I wanted to start
Hi everyone,
Here is an example from the perlrun perldoc page:
perl -ane 'print pop(@F), \n;'
is equivalent to
while() {
@F = split(' ');
print pop(@F), \n;
}
My question is, can I get Perl to evaluate a command line (like above)
and print out the
On Mon, Apr 25, 2005 at 01:45:15PM -0500, Larsen, Errin M HMMA/IT wrote:
Hi everyone,
Here is an example from the perlrun perldoc page:
perl -ane 'print pop(@F), \n;'
is equivalent to
while() {
@F = split(' ');
print pop(@F), \n;
}
My
-Original Message-
From: Paul Johnson [mailto:[EMAIL PROTECTED]
Sent: Monday, April 25, 2005 1:53 PM
To: Larsen, Errin M HMMA/IT
Cc: beginners@perl.org
Subject: Re: Perl One-liner de-compile?
On Mon, Apr 25, 2005 at 01:45:15PM -0500, Larsen, Errin M
HMMA/IT wrote:
Hi
Greetings
I am getting the following error when running a script using an anonymous array
of hashes:
Bad index while coercing array into hash at ./nhsDiffSchema.pl line 240
Here is the code snipt that both assigns values to the array of hashes and the
code which displays the values back
Larsen, Errin M HMMA/IT mailto:[EMAIL PROTECTED] wrote:
: Or is the @f array a secret array I'm not cleared to know about?
We could tell 'ya, but then we'd have to kill 'ya.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Apr 25, Larsen, Errin M HMMA/IT said:
$ perl -MO=Deparse -ane 'print pop(@F), \n;'
Note the @F, it's capital-F.
# perl -MO=Deparse -nae 'print $f[4]' /some/directory/somefile
You're using a lowercase @f here.
LINE: while (defined($_ = ARGV)) {
our(@F) = split( , $_, 0);
print $f[4];
Hello List.
Found the problem:
foreach my $record (@{dataFileHash{$datafile}}) {
Should have been:
foreach my $record (@{$dataFileHash{$datafile}}) {
Sorry ! I stared at this for like an hour and didn't notice the missing $
Can anyone tell me what the Argument NH_DATA01 isn't numeric in
-Original Message-
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]
Sent: Monday, April 25, 2005 2:42 PM
To: Larsen, Errin M HMMA/IT
Cc: beginners@perl.org
Subject: RE: Perl One-liner de-compile?
SNIP
You're using a lowercase @f here.
SNIP
Perl will magically
Larsen, Errin M HMMA/IT wrote:
Ok ... So I tried this:
# perl -MO=Deparse -nae 'print $f[4]' /some/directory/somefile
^
LINE: while (defined($_ = ARGV)) {
our(@F) = split( , $_, 0);
print $f[4];
^
}
-e syntax OK
On 4/25/05, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
I wish to read input from a user that has multiple lines with carriage
returns from stdin but not actually stop reading until a single # on a
line by itself. Is there a module / package / function that will aid in
this? I would like to do
Chris,
Thanks. I'm not switching to Apache http server.
Unfortunately the same thing happened again. I put the
first.pl in the /cgi-bin/ directory and try to access it via
http://localhost/cgi-bin/first.pl, it tells me that file not found.
I don't know what I should do for httpd.conf file.
Hi All,
I need to create fsa (final state machine).
I want to do it using DFA::Simple.
How can I install this package on WIN2K?
Thank you in advance
A.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On 25-Apr-05, at 10:06 AM, Jay Savage wrote:
On 4/25/05, Kevin Horton [EMAIL PROTECTED] wrote:
I'm trying to write a perl one-liner that will edit an iCalendar
format file to remove To Do items. The file contains several
thousand lines, and I need to remove several multi-line blocks. The
blocks
On 25-Apr-05, at 10:06 AM, Jay Savage wrote:
On 4/25/05, Kevin Horton [EMAIL PROTECTED] wrote:
I'm trying to write a perl one-liner that will edit an iCalendar
format file to remove To Do items. The file contains several
thousand lines, and I need to remove several multi-line blocks. The
blocks
--- Alex Lisbaron [EMAIL PROTECTED] wrote:
How can I install this package on WIN2K?
Use PPM, like:
dos-prompt ppm
then
ppm install DFA-Simple
---
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
39 matches
Mail list logo