On Nov 6, John W. Krahn said:
>Paul Harwood wrote:
>>
>> if ( /VALUE={1}(\d+)/ ) {
>>
>> looks for the first occurrence of value. How do I find the last occurrence?
>
>Probably the most efficient way:
>
>my $rev = reverse $_;
>if ( $rev =~ /(\d+)=EULAV/ ) {
Remember to reverse $1, though. You co
Paul Harwood wrote:
>
> I know that
>
> if ( /VALUE={1}(\d+)/ ) {
>
> looks for the first occurrence of value. How do I find the last occurrence?
Probably the most efficient way:
my $rev = reverse $_;
if ( $rev =~ /(\d+)=EULAV/ ) {
John
--
use Perl;
program
fulfillment
--
To unsubscribe,
Ramprasad A Padmanabhan wrote:
>
> I know this is more of an algorithm question but please bear with me.
>
> In my program I am checking wether a emailid exists in a list
> I have in the complete_list a string like
> $complete_string="<[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> ..
Christiane Nerz wrote:
>
> Hi everybody!
Hello,
> Two questions:
> I've got a test-file and want to add something to some lines, while
> reading it out.
> I tried the following code:
>
> while () {
> if (/pattern/) {
> #$line = $_ . $something;
> #push (@new_array, $line
[EMAIL PROTECTED] wrote:
> Hi all
> well im trying at lerning this perl stuff.. reading from the "learning
> perl" oreilly book and a few other places,
> but also using perl a long time before i should ie making the below script,
> so that i dont get in to any very bad habbits at such an early st
Pandey Rajeev-A19514 wrote:
> Hi,
>
> I don't know anything about perl graphics. I would explain excatly what I want.
>
> I want to develope a interactive graphical interface which can display all the nodes
> in a network in a tree representation.
> I should be able to draw that tree upon reading
"NYIMI Jose (BMB)" wrote:
> One reason to not use CGI.pm:
>
> An important concern today in the integration architecture is to provide a means to
> support different type of clients.
> Unfortunately CGI.pm will not fulfill the increasing requirements to support clients
> expecting other format t
Tore Aursand wrote:
> On Wed, 05 Nov 2003 17:22:43 -0600, Dan Muey wrote:
> >> If it comes to the point where you need to "hack around" CGI.pm, I'd
> >> say go with your original inclination to just do it yourself.
>
> > Give me one example when you'd need to hack CGI.pm to handle input that
> > y
I guess it depends on what you mean by using it "with" PCAnywhere. Many
of the things you would use PCAnywhere to do, you can do with Perl
without needing a program like PCAnywhere to do it, for example if you
wanted to install programs, change settings, etc.
-Original Message-
From: Tre
Hi! Newbie question here but is it possible to use PC Anywhere with Perl? If
so, how? What kinds of things can you do? This question came up in a
conversation with some friends and so I thought I'd ask the group. I'm sure
I'm a typical newbie in that I'm having trouble sensing the possibilities
Mike M wrote:
>
> Hi,
Hello,
> I'm new to Perl and have what I hope is a simple question: I have a Perl
> script that parses a log file from our proxy server and reformats it to a
> more easily readable space-delimited text file. I also have another file
> that has a categorized list of intern
On Thursday, Nov 6, 2003, at 16:40 US/Pacific, BetaGamma wrote:
[..]
If I want to remove my apache server do I need to only delete the
$HOME/apache directory and delete the enteris from my .cshrc or
anything else is also required.
[..]
well there is that whole bunch of questions about
which OS
Newbie here but hope this helps.
You have a page linked to the frame on the left right? All you need to
do is have your CGI script write the new page. You use the info from
the frame on the right and pass the values to your cgi script. Then let
your CGI script write out a new html page using the
Hi guys...
If I want to remove my apache server do I need to only delete the $HOME/apache
directory and delete the enteris from my .cshrc or anything else is also required.
Thanks
Pawan
-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
You would like to use this :
in your html page of your right frame.
Hope this help
- Original Message -
From: "Jack" <[EMAIL PROTECTED]>
To: "CGI1" <[EMAIL PROTECTED]>
Sent: Friday, November 07, 2003 8:11 AM
Subject: Simple CGI question
> Hello,
>
> I'm trying to redirect th
> Bee wrote:
> > open FH, ">1.txt";
> > binmode FH;
> > binmode STDOUT;
> > print FH "123m,zxnc,mzxnc,mzncm,zxc";
> > close FH;
> >
> > Why the output still a text file ?
>
Thanks everybody, the way I tried to make files to binary
format is just because I want to learn how to sysread and
syswrit
Hello,
I'm trying to redirect the output of my CGI (written
in Perl) to another frame,
but I'm not exactly sure how to do this. i.e. I have
two frames on my page
one on the right and one on the left. There is a form
on the right frame. When
the user clicks on the Submit button on my form, I'd
l
Steve Massey wrote:
>
> Hi
Hello,
> I though I had sussed this s/ stuff but
>
> #! /usr/bin/perl -w
>
> $test = "BRIGHTON (Firm)";
>
> print "$test\n";
> $test =~ s/,*/,/;
> $test =~ s/,*$/,/g;
>
> print "$test\n";
>
> does not work, I want to su
> > I need to remove ./ and #from a list of files. I can do it in sed but I am
> > not able to use it in my perl script. I tried to do something like this
# delete all .s and /s
$variable_to_remove_from =~ tr/\.\///d;
# remove the first ./ and anything before it from
# $variable_to_remove_from
if
Raghu Murthy wrote:
>
> I need to remove ./ and #from a list of files. I can do it in sed but I am
> not able to use it in my perl script. I tried to do something like this
>
> chomp ($txtlist = );
> qx' sed -e "/^#/d $txtlist'; # To remove lines starting with a #
> qx' sed -e"s?\([ /]\)\./?\1?g
Chandrasekaran Mythili wrote:
>
> HI,
Hello,
> I am new to Perl and I need some help regarding tranfering the contents of
> one file to other file in specified format using perl.
>
> the problem is i have one file with data(data is in hex) as follows:
> 48
> 30
> 20
> 2E
> 2E
> 2E
> 0
> 0
> 0
>
Rob Dixon wrote:
> my @fields = $string =~ m/\w+=(?:"[^"]+"|\S+)/g;
Nice!!
Joseph
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
What distro? Most of the times either you'll do something like $ rpm -U
./perl.rpm or make clean.
-Dan
-Dan
On Thu, 2003-11-06 at 16:50, Tim wrote:
> Hi,
> I have perl 5.6.0 on a Linux box and want to install 5.8.1 on it and remove
> the earlier version.
>
> The install is pretty straightforwa
Hi,
I have perl 5.6.0 on a Linux box and want to install 5.8.1 on it and remove
the earlier version.
The install is pretty straightforward, but I don't know how best to remove
the old version. Intuitively it would appear that blowing off everything
that has 'perl' in the filename in /usr/bin (m
Dan Anderson wrote:
> When I use:
>
> my @foo = glob "/foo/bar baz/*";
> or
> my @foo = glob "/foo/bar\ baz/*";
>
> Glob doesn't return the files in those directories, @foo equals
> ("/foo/bar");
>
> However, if I do:
>
> my @foo = glob "/foo/bar*baz/*";
>
> @foo equals an array with all the
On Thursday, Nov 6, 2003, at 10:21 US/Pacific, Dan Anderson wrote:
[..]
How do I escape spaces? Perldoc glob doesn't say.
[..]
an interesting problem, one thing that may influence
the problem is how your underlying shell does the
'expansion' - as the perldoc -f glob notes, with
perl 5.6 this is
On Thursday, November 6, 2003, at 11:13 AM, Tore Aursand wrote:
On Thu, 06 Nov 2003 10:31:18 -0600, James Edward Gray II wrote:
my @results;
[...]
Wasn't it the whole point that the OP _couldn't_ store this in an
array,
as it would consume too much memory? The solution goes like this;
You are co
> There are several XML and XSLT modules from CPAN that can
> help achiving aforementioned requiremnts, CGI.pm will not ...
>
The OP was interested in parsing form data, apparently from html.
Yes CGI does not parse/handle XML,
You would need an XML handling type module to do that.
And this se
From: Tore Aursand <[EMAIL PROTECTED]>
> On Thu, 06 Nov 2003 13:21:15 +0100, Jenda Krynicky wrote:
> >> There is absolutely _no_ reason why one shouldn't use the CGI.pm
> >> module.
>
> > There is one. If /s?he/ is using CGI::Lite instead ;-)
>
> In that case, there are many reasons. There are a
Bee wrote:
> open FH, ">1.txt";
> binmode FH;
> binmode STDOUT;
> print FH "123m,zxnc,mzxnc,mzncm,zxc";
> close FH;
>
> Why the output still a text file ?
A file's a file. Terms like "text" and "binary" are just conventions. To the
OS, a file's just a collection of bytes.
What were you expecting
One reason to not use CGI.pm:
An important concern today in the integration architecture is to provide a means to
support different type of clients.
Unfortunately CGI.pm will not fulfill the increasing requirements to support clients
expecting other format than HTML.
Such clients can be palm top
Bee wrote:
> open FH, ">1.txt";
> binmode FH;
> binmode STDOUT;
> print FH "123m,zxnc,mzxnc,mzncm,zxc";
> close FH;
>
> Why the output still a text file ?
Only thing binmode gives you is that what you put in will not be in any way
translated as part of the print and/or write. If you wan
> Why the output still a text file ?
This is a stab in the dark, but the binary equivalent of the characters in the string
are characters, correct? Have you tried seeing what happens when you output hex
values?
-Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
open FH, ">1.txt";
binmode FH;
binmode STDOUT;
print FH "123m,zxnc,mzxnc,mzncm,zxc";
close FH;
Why the output still a text file ?
> Investigate if a web application will meet your requirements ...
To expand on JosÃ's point, if you can use a web application you can buy
some slick looking templates for $20 off the 'net, and/or edit your web
page in Dreamweaver/Frontpage pro, or even just export an OpenOffice.org
document to HT
When I use:
my @foo = glob "/foo/bar baz/*";
or
my @foo = glob "/foo/bar\ baz/*";
Glob doesn't return the files in those directories, @foo equals
("/foo/bar");
However, if I do:
my @foo = glob "/foo/bar*baz/*";
@foo equals an array with all the files in "/foo/bar\ baz/", which is
what I"m tryi
Howdy,
Always use strict;
Then your variables won't get messy, see the perldoc strict for more details.
> foreach $site (@dataFile) { # loop for each line/site in dataFile
> chomp $site;
You might make your life easier to by not declaring a variable at all here:
for(@datafile) {
> > There is one. If /s?he/ is using CGI::Lite instead ;-)
>
> In that case, there are many reasons. There are a lot of
> CGI::* modules out there.
>
> My point is still valid, though; Why do one want to use
> CGI::Lite instead of CGI.pm? Is it better? No. Is it
> safer? No. Is it faste
> Global symbol "$site" requires explicit package name at ./makeArf.pl line 17.
One of the things about strict is it makes you declare the scope of your
variables before using them. So, for instance, while:
#! /usr/bin/perl
$foo = "foo\n";
print $foo;
Would run, the following wouldn't:
#! /usr
> On Thu, 06 Nov 2003 16:33:41 +, drowl wrote:
>> #!/usr/bin/perl -w
>
> No big deal, but - IMO - easier to read, and it adds strict;
>
> #!/usr/bin/perl
> #
> use strict;
> use warnings;
>
>> @dataFile=<>; # read in file from command line
>> @standardRules=`cat standard.for.arf.txt` ;
On Thursday, Nov 6, 2003, at 09:56 US/Pacific, [EMAIL PROTECTED] wrote:
i now get the below warning along with many others...
how does one declair a varible then?
Global symbol "$site" requires explicit package name at ./makeArf.pl
line 17.
I think your hit is at:
foreach $site (@dataFile) {
On Thursday, Nov 6, 2003, at 09:13 US/Pacific, Tore Aursand wrote:
[..]
My point is still valid, though;
p0: there is a cgi beginner's mailing list <[EMAIL PROTECTED]>
that is devoted to the specific fun/horror of cgi coding in perl
for those interested in raising the general issues.
p1: barring th
On Nov 6, Dan Anderson said:
>
>> Dan> So: foo->bar qw(foo bar); is equivalent to foo->bar("foo","bar"); ?
>>
>> Only in recent Perls.
>
>Do you know exactly how recent? Are we talking 5 or better or 3 or
>better?
Without check perldeltas, I'd say 5.6.
--
Jeff "japhy" Pinyan [EMAIL PROTEC
Good stuff all taken on board
did take me a while to figger out that EOF had to be at the begging of
the line tho, but i got there in the end...
and a question about "use strict"
i now get the below warning along with many others...
how does one declair a varible then?
Global symbol "$site"
West, William M wrote:
> find (\&transfer, $path);
>
> sub transfer {
> my ($newpath, $oldstring, $newstring) = @_;
> otherstuff ($oldstring, $newstring);
>
> # etc...
>
>
> }
>
>
> now- how do i pass parameters to transfer() when it's called with
> find??
>
> i want the rec
find (\&transfer, $path);
sub transfer {
my ($newpath, $oldstring, $newstring) = @_;
otherstuff ($oldstring, $newstring);
# etc...
}
now- how do i pass parameters to transfer() when it's called
with find??
i want the recursive fileprocessing to change file contents an
On Thu, 06 Nov 2003 13:21:15 +0100, Jenda Krynicky wrote:
>> There is absolutely _no_ reason why one shouldn't use the CGI.pm
>> module.
> There is one. If /s?he/ is using CGI::Lite instead ;-)
In that case, there are many reasons. There are a lot of CGI::* modules
out there.
My point is still
> Dan> So: foo->bar qw(foo bar); is equivalent to foo->bar("foo","bar"); ?
>
> Only in recent Perls.
Do you know exactly how recent? Are we talking 5 or better or 3 or
better?
Thanks in advance,
-Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROT
On Thu, 06 Nov 2003 16:33:41 +, drowl wrote:
> #!/usr/bin/perl -w
No big deal, but - IMO - easier to read, and it adds strict;
#!/usr/bin/perl
#
use strict;
use warnings;
> @dataFile=<>; # read in file from command line
> @standardRules=`cat standard.for.arf.txt` ;
my @dataFile
On Thu, 06 Nov 2003 10:31:18 -0600, James Edward Gray II wrote:
> my @results;
> [...]
Wasn't it the whole point that the OP _couldn't_ store this in an array,
as it would consume too much memory? The solution goes like this;
1. Define the files in an array
2. Start reading the first file
> please have a look at the code below and give comments
Here are some quick comments.
#1. Always "use strict"
#2. See #1.
When you "use strict" it foeces you to do things the "right way" and will
help catch errors because of the extra checks it makes.
So something like this:
> @dataFile=<>; #
Hi all
well im trying at lerning this perl stuff.. reading from the "learning
perl" oreilly book and a few other places,
but also using perl a long time before i should ie making the below script,
so that i dont get in to any very bad habbits at such an early stage.
could some one please have a
On Wednesday, November 5, 2003, at 05:20 PM, [EMAIL PROTECTED]
wrote:
This is my first attempt. My misunderstanding was in the fact that I
could
put the filehandles inside another filehandles while loop.
Good start. Now I'll help. ;)
#!perl
#!/usr/bin/perl
...is more standard.
use strict;
> "Dan" == Dan Anderson <[EMAIL PROTECTED]> writes:
Dan> So: foo->bar qw(foo bar); is equivalent to foo->bar("foo","bar"); ?
Only in recent Perls. The mapping of qw(...) to a (...) list at compile
time is a modern addition. Older Perls replaced it with a runtime
split on the string, and pro
About the design:
you should yourself ask this question:
"should i biuld a UI from scratch with Tk module or
should i consider biulding a web application (browser as client)".
Investigate if a web application will meet your requirements ...
José.
-Original Message-
From: Rob Dixon [mailt
Pandey Rajeev-A19514 wrote:
>
> I don't know anything about perl graphics. I would
> explain excatly what I want.
>
> I want to develope a interactive graphical interface
> which can display all the nodes in a network in a
> tree representation. I should be able to draw that
> tree upon reading a d
> > Give me one example when you'd need to hack CGI.pm to handle input
> > that you can't do without hacking it.
>
> Are you asking me? I said, "if it comes to the point that..."
>
> However, my example would be, as someone previously
> mentioned, doing something
> out-of-spec (assuming of co
> On Wed, 05 Nov 2003 17:22:43 -0600, Dan Muey wrote:
> >> If it comes to the point where you need to "hack around"
> CGI.pm, I'd
> >> say go with your original inclination to just do it yourself.
>
> > Give me one example when you'd need to hack CGI.pm to handle input
> > that you can't do wit
[sorry about that first post, I got ^X-happy]
On Nov 5, Dan Anderson said:
>use Data::Dump qw(dump);
>foo->bar qw(foo bar);
>Am I correct in assuming that if I have a subroutine foo (or method if
>called with a package name), and I use qw() it takes all words seperated
>by spaces, and passes the
On Nov 5, Dan Anderson said:
>I've noticed that in code examples something like the following will be
>used:
>
>use Data::Dump qw(dump);
>foo->bar qw(foo bar);
>
>(Syntax may not be 100% correct).
>
>Am I correct in assuming that if I have a subroutine foo (or method if
>called with a package name
From: Tore Aursand <[EMAIL PROTECTED]>
> On Wed, 05 Nov 2003 17:22:10 -0500, Dan Anderson wrote:
> > So I got so far with my own creation and am wondering if it should
> > be given the axe or continued.
>
> Axe it. Really. There is absolutely _no_ reason why one shouldn't
> use the CGI.pm module
Paul Harwood wrote:
The search patterns I am looking for are contained inside the list (each
element of the list is going to be used to scan an entire log file). So
"if ( /match/ )" needs to reference each element of the FOREACH loop
which I will have nested inside a while loop. That's what's
con
Use Perl/Tk to create powerful GUI's (There is a mailing list that deals
with this subject)
- Original Message -
From: "Pandey Rajeev-A19514" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 06, 2003 8:47 AM
Subject: Need help on perl graphical interface
> Hi,
>
> I
Le Wed, Nov 05, 2003 at 09:59:15PM -0800, R. Joseph Newton a écrit ...
> > I know that this exists already, but I can't find any code to pinch on
> > the web. :-(
> >
> > The thing I want to do, is to create a searchable index on a webpage.
> > It's a spoof newsgroup designed to take the piss ou
The search patterns I am looking for are contained inside the list (each
element of the list is going to be used to scan an entire log file). So
"if ( /match/ )" needs to reference each element of the FOREACH loop
which I will have nested inside a while loop. That's what's
confusing me.
-Orig
On Wed, 05 Nov 2003 17:22:43 -0600, Dan Muey wrote:
>> If it comes to the point where you need to "hack around" CGI.pm, I'd
>> say go with your original inclination to just do it yourself.
> Give me one example when you'd need to hack CGI.pm to handle input that
> you can't do without hacking it.
66 matches
Mail list logo