Currently I am in the midst of an argument
with myself about tactics and strategies
for doing CGI coding. The side effect of
which lead me to wonder about some prejudices
I seem to have about when, where and how to
cut over to using/creating a Perl Module for
code re-use. Some of this comes from
Hey,
I am writing a perl CGI script on a remote server that is supposed to do the
following:
1. Have the user sign in with a username and password.
2. Allow the user to add News Stories in which that input is taken and then
written to a text file (Which is as of this moment, set to chmod 777).
B. Fongo wrote:
Hello
An argument passed to a subroutine returns wrong value.
Code example:
@x = (1..5);
$x = @x;
showValue ($x); # or showValue (\$x);
sub showValue {
my $forwarded = @_;
print $forwarded; # print ${$forwarded};
}
In both cases, the script prints out 1.
B. Fongo wrote:
I'm quit confused with what I have below.
I have 2 database tables; Games and groups.
Name Group
#
John ,GroupA
Miler, GroupA
Peter, GroupB
Mathew, GroupB
Mark, GroupB
Luke, GroupA
I'm trying to select the members based on their groups and
Hi all,
I'm a bit late for a reply, but thought it would be appropriate to ask Babs
exactly what was required from the perl program.
Did you want to print the number of elements in the array, or print each
element in the array?
As Andrew Brosnan explained, setting a scalar equal to an array
I just installed perl and I don't know what settings I fiddled with, but now
on Windows Command Prompt I am unable to execute perl scripts with
somthing like, perl test.pl rather I have to do perl.exe test.pl
same for any application ... everything has to be suffixed with a .EXE
...
Please
In article [EMAIL PROTECTED], John W. Krahn wrote:
Kevin Pfeiffer wrote:
In article [EMAIL PROTECTED], John W. Krahn wrote:
my $string1 = 'C:\Program files\directory1\directory2\directory3';
my $string2 = 'C:\Program files\directory1\dir2\dir3';
( my $nulls = $string1 ^ $string2 )
SNIP, SNIP
What I want to do is replace any repeating spaces (two or more) with a
tab. I know the examples below do not work but am just giving it as
pseudocode of replacing repeating spaces (between 2 and 50) with a
tab:
s/sp[2..50]/\t/gi;
or maybe hex value (hex 20 is the space
Ramprasad A Padmanabhan wrote:
Nelson Wong wrote:
Hi all,
I always get three identical copies of a message all the time,
therefore, I just wonder if anyone has the same situation as mine!
Thanks!
BTW, it is a great ML!!! Happy knowledge sharing!
No, But reading the full headers of
David Wall wrote:
--On Saturday, September 06, 2003 7:45 PM -0400 perlwannabe
[EMAIL PROTECTED] wrote:
OK, I have a new problem. I need to delete an entire line that contains
certain text. I have done an extensive search and had no luck finding an
adequate answer. Yes, I also saw
I'm trying to place HTML Tags around the contents of Quoted material.
I'm using the following PERL code:
$TextBlockToConvert =~ s/(.+?)/FONT Color=BLUE\1\/Font/g;
Below, is an example of problem text this code chokes on.
Example Text:msgStop(, Invalid date)
1. The 1st set of
Rodney Wise wrote:
I'm trying to place HTML Tags around the contents of Quoted material.
I'm using the following PERL code:
$TextBlockToConvert =~ s/(.+?)/FONT Color=BLUE\1\/Font/g;
Below, is an example of problem text this code chokes on.
Example Text:msgStop(, Invalid
In article [EMAIL PROTECTED], John W. Krahn wrote:
Kevin Pfeiffer wrote:
In article [EMAIL PROTECTED], John W. Krahn wrote:
You need to convert the IP address to a 32 bit integer and back again.
[...]
(But this includes numbers such as 12.13.1.255 and 12.13.2.0 which are
not in the
From: Shishir Saxena [EMAIL PROTECTED]
I just installed perl and I don't know what settings I fiddled with,
but now on Windows Command Prompt I am unable to execute perl scripts
with somthing like, perl test.pl rather I have to do perl.exe
test.pl same for any application ... everything
Bob Showalter wrote:
Johnson, Shaunn wrote:
Howdy:
I'm looking for information that will let me
open an ftp connection and grep / search
for files and then FTP them back to me.
What do you mean grep/search for files? If you want to search for
particular file *names*,
John W. Krahn wrote:
Rodney Wise wrote:
I'm trying to place HTML Tags around the contents of Quoted material.
I'm using the following PERL code:
$TextBlockToConvert =~ s/(.+?)/FONT Color=BLUE\1\/Font/g;
Below, is an example of problem text this code chokes on.
Hello all...
I'm wanting to write a script that scans a file,
ignoring all lines until it reaches a certain
section, then processes all lines in that
section that are not comments, until it reaches
the end of that section.
The section would be designated like this:
## Beging Processing ##
##
Sorry for the first post, didn't mean this as
a reply.
Hello all...
I'm wanting to write a script that scans a file,
ignoring all lines until it reaches a certain
section, then processes all lines in that
section that are not comments, until it reaches
the end of that section.
The section
From: [EMAIL PROTECTED]
I need to do some kind of generic log trow my code, this will be used
just in debug mode.
I has sinking something like.
sub prepareLog{
foreach my $functionName (xpto()) {
next if not toLog($functionName);
*$functionName = sub {
print start:
Akens, Anthony wrote:
Sorry for the first post, didn't mean this as
a reply.
Hello all...
I'm wanting to write a script that scans a file,
ignoring all lines until it reaches a certain
section, then processes all lines in that
section that are not comments, until it reaches
the end
+1 to Bob;
José.
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]
Sent: Monday, September 08, 2003 5:29 PM
To: 'Akens, Anthony'; [EMAIL PROTECTED]
Subject: RE: Matching a section of test
Akens, Anthony wrote:
Sorry for the first post, didn't mean this as
a reply.
Matt Matijevich wrote:
foreach (@master_file) {
chomp($_);
@temp = split(',', $_);
nope. Should be:
@temp = split(/,\s*/, $_);
split uses regex patterns to split on. The join function does use strings.
$master{$temp[0]} = $temp[1];
}
foreach
Kevin Pfeiffer wrote:
In article [EMAIL PROTECTED], John W. Krahn wrote:
Kevin Pfeiffer wrote:
In article [EMAIL PROTECTED], John W. Krahn wrote:
You need to convert the IP address to a 32 bit integer and back again.
[...]
(But this includes numbers such as 12.13.1.255 and
Ramprasad A Padmanabhan wrote:
Nelson Wong wrote:
Hi all,
I always get three identical copies of a message all the time,
therefore, I just wonder if anyone has the same situation as mine!
Thanks!
BTW, it is a great ML!!! Happy knowledge sharing!
Nelson
No,
Rob Dixon wrote:
John W. Krahn wrote:
$TextBlockToConvert =~ s/([^]*)/length $1 ? 'FONT Color=BLUE\1\/Font' :
''/eg;
Almost right! But the deprecated \1 in the replacement string won't
work with the /e modifier: it needs to be $1. Although I'm sure you
knew that.
Yes, but I didn't
Akens, Anthony wrote:
The files are all pipe-delimited, so I don't have a problem separating the
fields, I just am not sure how to make it remove all extra whitespace. It
needs to keep all Space in the fields thedescription of the
file should still be readable
HI Casey,
Can you get [EMAIL PROTECTED] off this list?
His ISP's MAILER_DAEMON is spamming the list with
error messages. My policy is to forward a correction
for each to [EMAIL PROTECTED] until they
stop.
Joseph
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
I know I saw something like this in the past I just can't find it. Anyone got any
ideas?
perl -e 'print eval { @ARGV }, \n' 5 + 5
it should be able to take any perl arithmetic operator. so:
perl -e 'print eval { @ARGV }, \n' 840928302840982 / 74098374
or
perl -e 'print eval { @ARGV }, \n'
Stephen Gilbert wrote:
I know I saw something like this in the past I just can't find it. Anyone got any
ideas?
perl -e 'print eval { @ARGV }, \n' 5 + 5
it should be able to take any perl arithmetic operator. so:
perl -e 'print eval { @ARGV }, \n' 840928302840982 / 74098374
or
Dan Muey wrote:
-Original Message-
From: Randal L. Schwartz [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 12:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Test if browser's allows cookies/has them turned onetc..
Dan == Dan Muey [EMAIL PROTECTED] writes:
Dan
I want to thank everybody who helped me with my Hash problems. You
guys/gals are GREAT.
Again Thanks !!!
Larry Sandwick
Sarreid, Ltd.
Network/System Administrator
phone: (252) 291-1414 x223
fax : (252) 237-1592
Thanks Bob, I'm going to file this away in
my nifty perl code file.
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]
Sent: Monday, September 08, 2003 10:29 AM
To: Akens, Anthony; [EMAIL PROTECTED]
Subject: RE: Matching a section of test
Akens, Anthony wrote:
Sorry for
Akens, Anthony wrote:
Thanks Bob, I'm going to file this away in
my nifty perl code file.
I'm guessing this (range operator) behavior was part of sed's influence on
Perl. Perhaps one of the Perl historians can confirm?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
On Mon, Sep 08, 2003 at 03:50:25PM -0400, Stephen Gilbert wrote:
I know I saw something like this in the past I just can't find it. Anyone got any
ideas?
perl -e 'print eval { @ARGV }, \n' 5 + 5
it should be able to take any perl arithmetic operator. so:
perl -e 'print eval { @ARGV },
Dan Muey wrote:
-Original Message-
From: Randal L. Schwartz [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 12:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Test if browser's allows cookies/has them turned
onetc..
Dan == Dan Muey [EMAIL PROTECTED]
Nitin Aggarwal wrote:
Hi ,
I am writing this code to telnet into windows machine.
The code works fine on the unix machine and runs the command 'ps -ef'. On W2K I am
trying to telnet into the machine and to recognize the prompt 'C:\' . but it keeps
on giving the error 'time-out. I have
On Mon, 2003-09-08 at 16:11, Dan Muey wrote:
Dan Muey wrote:
-Original Message-
From: Randal L. Schwartz [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 12:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Test if browser's allows cookies/has them turned
-Original Message-
From: Randal L. Schwartz [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 12:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Test if browser's allows cookies/has them turned
onetc..
Dan == Dan Muey [EMAIL PROTECTED]
R. Joseph Newton wrote:
Does your Windows machine have a telnet server?!? I envy you, I
guess. When I try reaching my laptop from my desktop via command
line, I get:
Greetings! E:\d_drive\perlStufftelnet 192.168.0.97
Connecting To 192.168.0.97...Could not open a connection to host:
David T-G wrote:
Hi, all --
I'm having some trouble using this wonderful-looking module to tackle
catching bounced mail and doing something with it. I've followed the
man page to a tee but get errors.
Figuring that y'all can find the man page or don't need it, here is my
basic script
Could some one show me an example of a labeled block (goto)?
Thanks
Thomas
Antonio Jose wrote:
Hello I have 3 weeks learning Perl and I am trying to solve a
trouble
I need to write my thesis
Learn Perl first, then try to apply it to complex mathematical issues.
I have to read a file where I don't know the content of the first rows
(only strings) and I
Thomas Browner wrote:
Could some one show me an example of a labeled block (goto)?
perlsyn.pod has many examples of labeled blocks
perldoc perlsyn
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Monday, September 8, 2003, at 05:15 PM, R. Joseph Newton wrote:
Your script had almost 100 lines of incomprehesible scripting garbage
before the first subroutine definition.
Egad, is that called for? I personally consider it offensive and
outside the realm of constructive criticism.
James
Yes, his machine could very well have Telnet Server installed -- see below
-Original Message-
From: R. Joseph Newton [mailto:[EMAIL PROTECTED]
Sent: Monday, September 08, 2003 1:37 PM
To: Nitin Aggarwal
Cc: [EMAIL PROTECTED]
Subject: Re: retrieve command data from DOS using telnet
I'm looking at HTML::TokeParser. It expects a scalar with a filename or a
reference to a scalar containing the data to parse.
This works fine:
my $html;
if (@ARGV) { # get filename for TokeParser
$html = shift;
} else {
my @html = ;
$html = \(join '', @html);
Shishir Saxena wrote:
I just installed perl and I don't know what settings I fiddled with,
I trust that YOU did not fiddle with any settings. Fiddling with nsettings is
agood recipe for making a Perl installation fail--especially if you do not know
which ones you changed. If you are working
Let's say thatI wroute some code long time ago:
code1.pl. In the file there is this subroutine1();
now I am writting another code code2.pl, and would
like to use that subroutine1()...how do I do it
without copy and pasting it to my code2.pl?
__
Do you Yahoo!?
This brings up an interesting oddity that I have on my windows install.
I can execute a script by just calling it
Myscript.pl
This works however if I need to pass arguments on the command line then it
fails. I have to call it like this
perl myscript.pl arg1 arg2
Anyone ideas on to why?
John W. Krahn wrote:
Stephen Gilbert wrote:
I know I saw something like this in the past I just can't find it. Anyone got any
ideas?
perl -e 'print eval { @ARGV }, \n' 5 + 5
it should be able to take any perl arithmetic operator. so:
perl -e 'print eval { @ARGV }, \n'
Raghupathy wrote:
Hi,
I like to use WWW::Mechanize to scrape a website.
However the website has a authentication page. Is
there a perl module I can use to perform the
authentication ?
Thanks,
Raghu
Do you have the authors permission to scrape? It is possible that
they want to make
Christiane Nerz wrote:
Oh-oh - there was a mistake - I tried chomp, not chmod..
How do I use chomp correctly? I have an array of strings, want to cut
off the last \n in each line and use the rest of the line. (concatenate
it to another string)
Jane
Return to the original thread [which you
No extra module is needed. WWW::Mechanize is a subclass of LWP::UserAgent,
which supports it.
my $ua = new WWW::Mechanize();
$ua-credentials('www.myhostname.com:80', 'RealmName', 'user', 'pass');
$ua-get('http://www.myhostname.com');
print $ua-content;
The params are host/port, realm,
Christiane Nerz wrote:
Hi all!
I like to read several rows out of two different table-files and put
them successively in a new file by:
@ergebnis_alles[$#ergebnis_alles+1] = @whole_data1[$l] . $whole_data2[$m];
Anything works fine, except that I can't delete the ending newline in
the
R. Joseph Newton wrote:
John W. Krahn wrote:
Try it like this:
perl -le 'print eval @ARGV'
Good on 'nix/'nux, I guess. On Windows, It takes a little different quoting:
You mean like:
perl -le print eval [EMAIL PROTECTED]
Greetings! E:\d_drive\perlStuffperl -le print eval
Kevin Pfeiffer wrote:
I'm looking at HTML::TokeParser. It expects a scalar with a filename or a
reference to a scalar containing the data to parse.
This works fine:
my $html;
if (@ARGV) { # get filename for TokeParser
$html = shift;
} else {
my @html = ;
R. Joseph Newton wrote:
Kevin Pfeiffer wrote:
I'm looking at HTML::TokeParser. It expects a scalar with a filename or a
reference to a scalar containing the data to parse.
This works fine:
my $html;
if (@ARGV) { # get filename for TokeParser
[EMAIL PROTECTED] wrote:
Hello,
From an Oracle utlfile data under unix, I generate an Excel-Worksheet with
the module Spreadsheet::WriteExcel.
How can I do the same, but for Access ?
Thank you.
Olivier
Access is a SQL-compliant database. Therefore you should use DBI.
Joseph
--
To
Ned Cunningham wrote:
Funny you just caught me working on something similar, and I have modified
this code for my purposes. This should lead you in the right direction!
Snip
#!/usr/bin/perl
use Win32::Console;
$StdIn = new Win32::Console(STD_INPUT_HANDLE);
my $Password = ;
Hi ,
Please let me know if anyone has a clue about this one.
error on running a perl script
ld.so.1: perl: fatal: relocation error: file
B. Fongo wrote:
I'm quit confused with what I have below.
I have 2 database tables; Games and groups.
Name Group
#
John ,GroupA
Miler, GroupA
Peter, GroupB
Mathew, GroupB
Mark, GroupB
Luke, GroupA
I'm trying to select the members based on their groups and
B. Fongo wrote:
Hello
An argument passed to a subroutine returns wrong value.
Code example:
@x = (1..5);
$x = @x;
showValue ($x); # or showValue (\$x);
sub showValue {
my $forwarded = @_;
print $forwarded; # print ${$forwarded};
}
In both cases, the script prints out 1.
use what the message states;
you are using an uninitialize string.
example
my $string;# $string is declared but not initialized!
so any operation you do on that string (except an assignment) with produce
the error message.
- Original Message -
From: Devon Young [EMAIL PROTECTED]
At 20:13 06/09/2003, Devon Young wrote:
What does this mean?? I'm thoroughly puzzled and I've been scouring the
net for an answer. I've been assuming it means I'm not putting strings
together correctly, but I can't figure out how to fix it. Here's the
errors I'm getting, followed by the peice
64 matches
Mail list logo