Frank Wiles wrote at Wed, 12 Mar 2003 10:14:16 -0600:
> If you're wanting to find the last digit in a scalar, you'll want to
> modify this to be:
>
> ($match) = $num =~ /(\d)$/;
>
> or if there is always there characters you can also do this:
>
> ($match) = $num =~ /\d\d(
Janek Schleicher wrote:
>
> Frank Wiles wrote at Wed, 12 Mar 2003 10:14:16 -0600:
>
> > If you're wanting to find the last digit in a scalar, you'll want to
> > modify this to be:
> >
> > ($match) = $num =~ /(\d)$/;
> >
> > or if there is always there characters you can also do th
Hi all,
In FILE1 I want to replace all the lines containing:
Instructor: [A-Z].+
with the complete biography for each instructor in FILE2
or
replace this text in FILE1
Instructor: GENE ABBOTT
with this text from FILE2
GENE ABBOTT, M.A., has worked in vocational and adult education si
HEL,
Recently, I have been playing around with server push, however, it doesn't
work with Internet Explorer. :(
I have already programmed a chat, but I don't like the method of updating
new messages. The script prints a refresh headers every 5 seconds to
refresh the m
Derek Romeyn wrote:
> K, I tried this and it didn't work as expected:
>
> $code =~ / HTTP\/\d\.\d\" (\d+)/;
> if (!$code) {
> print "NEXT\n";
> next;
> }
> print "$code\n";
>
>
> The loop just printed NEXT 300 or so times. I was t
Jeff Westman wrote:
> Hello All,
>
> I have a trivial question. I have a perl script, with several
> sub-routines.
> In one of those routines, I currently have listed 'use Date::Calc'. So
> that package is therefore only available (and needed) in that one
> sub-routine.
>
> My question is, sho
Is there a perl Editor for linux? (except EMACS)
Francesco
__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTE
Is CGI::Push module what you are looking for ?
http://search.cpan.org/author/JHI/perl-5.8.0/lib/CGI/Push.pm
José.
> -Original Message-
> From: Yupapa [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 13, 2003 6:45 AM
> To: [EMAIL PROTECTED]
> Subject: Programming a Chat Room (Server Pu
Clear DayI Wanna Get Weighed
John took his blind date to the carnival. "What would you like
to do first, Kim?" asked the man. "I want to get weighed,"
said the girl.
They ambled over to the weight guesser. He guessed 120 pounds.
She got on the scale; it read 117 and she won a prize.
Hello,
Thanks CGI::Push doesn't work with internet explorer as i said earlier...
But I came up with a better method using while(1) { } and sleep.
It runs like a daemon and doesn't use meta refresh anymore. =)
###
# Yupapa Web Hosting =^.^=
# Web Site - http://www.yup
Hi,
Does anyone know how I can go about introducing a single random
deletion. I have file containing blocks of alphabet each block with a
uniq tag. I have passed this into a hash where the tags are the keys
and values are the blocks. Is there a quick and easy way to randomly
remove a single lette
Scott E Robinson wrote:
>Rob Hanson wrote:
>> You might be able to shorten this, but this seems to work ok...
>>
>> $x = ':B000:W000:M260:8:';
>> @y = $x =~ /:8:/g;
>> print scalar(@y);
>>
>> @y will contain the matches, one for each element of the array.
>> Grabbing the array in scalar context wi
Aimal Pashtoonmal wrote:
>
> Hi,
Hello,
> Does anyone know how I can go about introducing a single random
> deletion. I have file containing blocks of alphabet each block with a
> uniq tag. I have passed this into a hash where the tags are the keys
> and values are the blocks. Is there a quick
Aimal Pashtoonmal wrote:
> Hi,
>
> Does anyone know how I can go about introducing a single random
> deletion. I have file containing blocks of alphabet each block with a
> uniq tag. I have passed this into a hash where the tags are the keys
> and values are the blocks. Is there a quick and easy w
Rob Dixon wrote:
>
> #perl
> use strict;
> use warnings;
>
> my @target = map { s/\s.*//s; $_ } ;
> close DATA;
>
> my $candidate = ':B000:W000:M260:8:';
>
> foreach my $soundex ($candidate =~ m/\w+/g) {
>
> printf "%4s -", $soundex;
>
> foreach (@target) {
> my $count = @{[m/
Good Point!
I loaded this version because it was on a CD
that came with a book I purchased.
I will go to www.perl.org and download
the newer version.
Thank You!
Horace
- Original Message -
From: R. Joseph Newton
To: Mr. Horace Franklin Jr.
Cc: [EMAIL PROTECTED]
Sent: Wednes
Thanks all. The item below works. I did not know one could use rand in
that way.
cheers. aim.
=
Rob Dixon wrote:
> Aimal Pashtoonmal wrote:
> > Hi,
> >
> > Does anyone know how I can go about introducing a single random
> > deletion. I have fil
Try EditPad Pro. The author has now ported his wonderful Windows text
editor to *nix and added some nice features.
http://www.editpadlite.com/editpadpro.html
-Michael
>>> Francesco del Vecchio <[EMAIL PROTECTED]> 03/13/03 04:42AM
>>>
Is there a perl Editor for linux? (except EMACS)
Francesco
Hi
> Is there a perl Editor for linux? (except EMACS)
I use 'vim' or under X11 'gvim'. Works quite good for me. I's highly
configurable and can do pretty much anything an editor should.
Syntax highlighting included of course!
--
GnuPG Key avalaible at: http://www.philipp-ist.net/gpg/
KeyID:
John W. Krahn wrote:
>
> No need to create and then dereference an anonymous array, you can get
> list context for the count like this:
>
> my $count = () = /\b$soundex\b/g;
Thanks John: I've never seen that before. By rights I would have thought
it should assign either zero (as the numb
I'm trying to use a Script for showing who's online on my site.
I have been using it on the main page, but I want it to look for somebody
who could have get in the site trhough anoter page.
The matter is I need to use SSI for calling the script.
To look on the entire site I need to use SSI on ev
Is there a way in Perl to make a directory and transfer files to it?
Lou
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Like with Net::FTP?
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message-
> From: Luinrandir Hernsen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 13, 2003 7:13 AM
> To: [EMAIL PROTECTED]
>
Thanks again Rob some great advice, Perl's ambiguity could
also be described as its flexibility I guess.
I am trying to learn how to create OO modules but that
clone path I took, lead me away from what I was actually
doing. I see it is not an essential element in creating
object structures, I don
Luinrandir Hernsen wrote:
> Is there a way in Perl to make a directory and transfer files to it?
> Lou
Sure. You can create a directory with the mkdir() function. Take
a look at the documentation:
perldoc -f mkdir
and there are many ways of populating that directory - it depends
where the fi
Okay, since i wasn't clear the first time, let me try again. Sorry, I'm
not a professional programmer, I'm a true beginner.
SHORT VERSION:
What I want is Joseph's option 2b, if I understand him correctly. Given a
string of the form
:M260:
I want to get a count of its occurrences in a single
To All,
Recently, a member/user of [EMAIL PROTECTED] brought
to my attention that I had addressed a joke email, I Wanna
get Weighed, to [EMAIL PROTECTED] This email was sent
was sent by accident. It was a mistake.
Nevertheless, I owe each and every one of you an apology.
Please accept my d
Rob Dixon <[EMAIL PROTECTED]> wrote:
> John W. Krahn wrote:
>>
>> No need to create and then dereference an anonymous array, you
>> can get list context for the count like this:
>>
>> my $count = () = /\b$soundex\b/g;
>
> Thanks John: I've never seen that before. By rights I would have
Hi All,
I'm passing a hash to a subroutine like this:
subname("a" => 123, "b" =>"fff", "C" => "joyjoyjoy");
On the receiving side I want all keys to be upper case. I can map like
this:
sub subname{
map {$_ =~ tr/a-z/A-Z/} @_;
my %values = @_;
..
Pam, Using the +< for the re-writes won't work. I believe they need to be the same
size for what you want to replace. Since you are using a name and then replacing with
the name plus bio, you will need a third file to write to. How many instructors do
you have? Unless file2 is the same order a
I have about 900 instructors and file2 is NOT in the same order as file1... I'll give
the key/value approach
thanks,
Pam
>>> "Wagner, David --- Senior Programmer Analyst --- WGO" <[EMAIL PROTECTED]> 03/13/03
>>> 08:37 AM >>>
Pam, Using the +< for the re-writes won't work. I believe they need t
Hi all,
In my site i want to restrict the view of a hyperlink document to
the authorised people.But in mycase if one paste the url to that document
in browser it will open that doc file.If i protect the directory by
password protection using httpd.conf and htaccess files problem with the
url
Have you checked you path to perl?
What do you mean that has nothing to do with the problem?
Oh I'm sorry I thought this was a perl list! ;p
> Hi all,
>In my site i want to restrict the view of a hyperlink
> document to the authorised people.But in mycase if one paste
> the url to that
Pam Derks wrote:
> Hi all,
Hi Pam,
I think you may be making it harder than it needs to be. I will add some inline
comments .
> In FILE1 I want to replace all the lines containing:
> Instructor: [A-Z].+
You are jumping far too quickly into code here. This should be in english. Are you
ac
"Mr. Horace Franklin Jr." wrote:
> To All,
>
> Recently, a member/user of [EMAIL PROTECTED] brought
> to my attention that I had addressed a joke email, I Wanna
> get Weighed, to [EMAIL PROTECTED] This email was sent
> was sent by accident. It was a mistake.
>
> Nevertheless, I owe each and eve
Hi,
I am modifying a file and replacing a string that I find, which works just
fine. However, sometimes there is already a string there that I don't want to
replace, but instead append something to it.
Here's what I've got so far: (obligatory use statements not included here)
while () {
Scott E Robinson wrote:
> Okay, since i wasn't clear the first time, let me try again. Sorry,
> I'm not a professional programmer, I'm a true beginner.
Don't apologise for not being a prefessional programmer: some
would consider it a thing to be proud of :-)
>
> SHORT VERSION:
>
> What I want is
deb wrote:
> Hi,
>
> I am modifying a file and replacing a string that I find, which works
> just fine. However, sometimes there is already a string there that I
> don't want to replace, but instead append something to it.
>
> Here's what I've got so far: (obligatory use statements not included
Hi
Can anybody tell me witch module may i instal with ppm3 that haldles jpg files (edit
cuts,resizes) etc
When i try to install GD it give me ann error message
thnaks
Everything you asked about is answered here:
http://www.webreference.com/programming/ssi/intro/index.html
Gregg O'Donnell
Webmaster
Virginia Department of Forestry
www.dof.state.va.us
Ramón Chávez <[EMAIL PROTECTED]> wrote:I'm trying to use a Script for showing who's
online on my site.
I have b
Andre Chaves Mascarenhas wrote:
> Hi
> Can anybody tell me witch module may i instal with ppm3 that haldles
> jpg files (edit cuts,resizes) etc When i try to install GD it give me
> ann error message thnaks
You might look at the http://www.imagicmagick.org and what it offers if you
need t
Deb wrote:
> Hi,
>
> I am modifying a file and replacing a string that I find, which works
> just fine. However, sometimes there is already a string there that I
> don't want to replace, but instead append something to it.
>
> Here's what I've got so far: (obligatory use statements not included
>
Hello everyone,
I have a cgi script that sends a text message to a specified user's cell
phone or pager. The cell phones are only capable to accepting 130 character
messages, which is rather short. The pager company's automatically split the
messages if they are over a specified length. I was wond
Liebert, Sander wrote:
> Hello everyone,
>
> I have a cgi script that sends a text message to a specified user's
> cell phone or pager. The cell phones are only capable to accepting
> 130 character messages, which is rather short. The pager company's
> automatically split the messages if they are
[EMAIL PROTECTED] wrote:
> Hi All,
>
> I'm passing a hash to a subroutine like this:
> subname("a" => 123, "b" =>"fff", "C" => "joyjoyjoy");
Hi Peter,
You probably sholdn't be doing this. Keys, whether in a hash or a database table, are
primary references. They should not be modified af
hey Gues what there is no perl on www.techieindex.com
and If it does then I guess there should be a survey for that site.. asap.
coz i was just not able to locate perl stuff on that site.
expecting a reply
thanx
Sam
From: "Perl" <[EMAIL PROTECTED]>
To: "Voodoo Raja" <[EMAIL PROTECTED]>
Su
Hello, All:
A couple of years ago there was a great article by the title of "Punishing
Your Server With Perl". (I believe that either Randal Schwartz or Ruben
Lerner wrote the article.) Anyhow, I can't find it. I've checked Google
but found nothing.
Where oh where did it go?
--
Eric P.
Sunny
Kewl! I didn't know you could do that,
$_ .= $sometext;
That's just what I needed. Beats the heck out of the search and replace I was
doing when I didn't need to.
Thanks all!
d
Wags had this to say,
> if ( /^That_Text\s=\s2/ ) {
> $_ .= $addText;
>}els
Deb wrote:
> Hi,
>
> I am modifying a file and replacing a string that I find, which works just
> fine. However, sometimes there is already a string there that I don't
> want to replace, but instead append something to it.
>
> Here's what I've got so far: (obligatory use statements not included
Rob Dixon wrote:
> my $key = ':L000:W000:M260:B271:8:A:';
> my $regex = join '|', ($candidate =~ m/\w+/g);
Slick! I like it. It's not my style exactly [I'd at least throw a comment in: "Set
up or for regex"], but it definitely caught my fancy.<| :-o )
Joseph
--
To unsubscribe, e-
On Thu, 13 Mar 2003 [EMAIL PROTECTED] wrote:
> A couple of years ago there was a great article by the title of "Punishing
> Your Server With Perl". (I believe that either Randal Schwartz or Ruben
> Lerner wrote the article.) Anyhow, I can't find it. I've checked Google
> but found nothing.
>
>
Peter Farrar wrote:
>
> Hi All,
Hello,
> I'm passing a hash to a subroutine like this:
> subname("a" => 123, "b" =>"fff", "C" => "joyjoyjoy");
>
> On the receiving side I want all keys to be upper case. I can map like
> this:
> sub subname{
> map {$_ =~ tr/a-z/A-Z/} @_;
Randal L. Schwartz wrote:
>> "Peter" == Peter Farrar <[EMAIL PROTECTED]> writes:
>
>>> Replace
>>>
>>> EVIL: map { some;block;of;code;that;changes;$_ } @some_array;
>>>
>>> with
>>>
>>> GOOD: for (@some_array) { some;block;of;code;that;changes;$_ }
>
>
> The foreach loop *will* be faster
R. Joseph Newton wrote:
> Rob Dixon wrote:
>
> > my $key = ':L000:W000:M260:B271:8:A:';
> > my $regex = join '|', ($candidate =~ m/\w+/g);
>
> Slick! I like it. It's not my style exactly [I'd at least throw a
> comment in: "Set up or for regex"], but it definitely caught my
> fancy.<| :-
> > Is there a perl Editor for linux? (except EMACS)
Perhaps have a try with nedit - HTH Thorsten
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
deb wrote:
> Hi,
>
> I am modifying a file and replacing a string that I find, which works just
> fine. However, sometimes there is already a string there that I don't want to
> replace, but instead append something to it.
>
> Here's what I've got so far: (obligatory use statements not included h
Wait. Using this construct, I can't seem to get the change to write out to
the file, like I can to stdout.
> > while () {
> if ( /^That_Text\s=\s2/ ) {
> $_ .= $addText;
>}else {
> s/^This_Text.*$/That_Text = 2/;
>}
> You don't need the $_ since this is
Voodoo Raja wrote:
> hey Gues what there is no perl on www.techieindex.com
>
> and If it does then I guess there should be a survey for that site.. asap.
>
> coz i was just not able to locate perl stuff on that site.
>
> expecting a reply
>
> thanx
> Sam
>
Hi Sam,
If you have some issue about t
Deb wrote:
>
> Wait. Using this construct, I can't seem to get the change to write out to
> the file, like I can to stdout.
>
> > > while () {
> > if ( /^That_Text\s=\s2/ ) {
> > $_ .= $addText;
> >}else {
> > s/^This_Text.*$/That_Text = 2/;
> >}
> > You
How about "vim" - on vim's sf site (vim.sourceforge.net) there are
plenty of handy macro scripts for perl editing as well.
On Fri, 2003-03-14 at 07:36, Thorsten Dieckhoff wrote:
> > > Is there a perl Editor for linux? (except EMACS)
>
> Perhaps have a try with nedit - HTH Thorsten
--
To unsu
Scott E Robinson wrote:
>
> Okay, since i wasn't clear the first time, let me try again. Sorry, I'm
> not a professional programmer, I'm a true beginner.
>
> LONG VERSION:
>
> I think John W. Krahn's post is very close to what I was actually asking.
> John's solution showed me that the context
Derek Romeyn wrote:
> Using your idea I ended up with data like this. Which is odd because the
> database should only include 400 and 500 type errors.
>
> 176
> 404
> 370
> 157
> 404
> 370
> 526
> 178
> 176
> 404
> 526
> 526
>
> So I went ahead and modified it to print the code and the dataline
"Romeyn, Derek" wrote:
So I went ahead and modified it to print the code and the dataline and got
Hi Derek,
Take some time here to look at the string, and think about how you know which part is
the error code. Is it just because you find a space after "HTTP"? It seems to me
that there are some
Pam Derks wrote:
> thanks for help, here's my solution, any further comments are welcomed...
>
> thanks, Pam
Hi Pam,
What are the results from your test run? I foresee trouble beyond the first replaced
instrucor name. Let me know if I am off base here.
Joseph
> #!/usr/bin/perl -w
> use stri
"R. Joseph Newton" wrote:
... an integer, followed by a *backslash*. # HTTP\d+\/
> There will be something on the other side of the *backslash*, to identify
> subversion. Let's not count
baskslash? Did somebody say "backslash"? Huh? I didn't hear anything. <| 8-O )
Joseph
--
To unsubsc
My export.txt file has data in the format
Joe Doe mail: [EMAIL PROTECTED]
I want my script to replace mail for email. At the end of the script I get
an empty file? Why what am i doing wrong
#!/user/bin/perl
open(openFile, "export.txt");
while()
{
print writeFile if s/mail/email/ ;
}
___
Erwin Zavala wrote:
> My export.txt file has data in the format
>
> Joe Doe mail: [EMAIL PROTECTED]
>
> I want my script to replace mail for email. At the end of the script
> I get an empty file? Why what am i doing wrong
>
> #!/user/bin/perl
>
> open(openFile, " open(writeFile, ">export.txt"
Hi,
I just found out about this Cron.pm module in Perl and would like to use
it to schedule to run my perl scripts (I think the syntax is right.. I
was hoping to run it to see what it does.) Anyway, I installed Cron.pm
v1.5 and was trying to run the following script.
#!/usr/bin/perl
use strict;
Have you tried typing "Install POSIX::setsid" from the Perl Package
Manager?
Gregg
On Thursday, March 13, 2003, at 10:13 PM, Heidi Ng wrote:
Hi,
I just found out about this Cron.pm module in Perl and would like to
use
it to schedule to run my perl scripts (I think the syntax is right.. I
was
Actually, I think my first question should be if this module will work
with Windows. If no, then, is there a Perl module that does cron for
windows?
Thanks again,
Heidi
-Original Message-
From: Heidi Ng [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 9:14 PM
To: [EMAIL PROTECT
Yes, I did a install POSIX::setsid on ppm but I had no luck finding the
modules. And then I did a install POSIX and got the following error:
Error: Failed to download URL http://www.roth.net/perl/POSIX.ppd: 500
Can't connect to $1:80 (Bad hostname '$1')
ppm>
Heidi
-Original Message-
Fro
I don't know enough about Windows, but it does have a Task Manager
application that can be used for scheduling jobs. I don't know if it
is as powerful as cron.
Gregg
On Thursday, March 13, 2003, at 10:24 PM, Heidi Ng wrote:
Actually, I think my first question should be if this module will wor
I would try other FTP sites, especially CPAN itself. In UNIX one can
configure multiple ftp sites. I'm not sure how the Windows PPM/FTP
configuration works.
GRA
On Thursday, March 13, 2003, at 10:29 PM, Heidi Ng wrote:
Yes, I did a install POSIX::setsid on ppm but I had no luck finding the
Currently, I have 4 repository where ppm would go through for a search:
Repositories:
[1] ActiveState PPM2 Repository
[2] ActiveState Package Repository
[3] Jenda
[4] Roth
Heidi
-Original Message-
From: Gregg R. Allen [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 9:37 PM
To:
> "Peter" == Peter Farrar <[EMAIL PROTECTED]> writes:
Peter> Hi All,
Peter> I'm passing a hash to a subroutine like this:
Peter> subname("a" => 123, "b" =>"fff", "C" => "joyjoyjoy");
Peter> On the receiving side I want all keys to be upper case. I can map like
Peter> this:
Peter>
>First, please don't use map in a void context for its side effects.
Uh oh... What side effects? I use map like this all the time! What dread
is looming in my future?
>Just loop it:
>
>sub subname {
> my %values;
> while (@_ >= 2) {
>my ($key, $value) = splice @_, 0, 2;
> "Peter" == Peter Farrar <[EMAIL PROTECTED]> writes:
>> First, please don't use map in a void context for its side effects.
Peter> Uh oh... What side effects? I use map like this all the time! What dread
Peter> is looming in my future?
Replace
EVIL: map { some;block;of;code;that;change
Read this from perldoc
C:\WINNT>perldoc -q void
Found in C:\Perl\lib\pod\perlfaq6.pod
What's wrong with using grep or map in a void context?
Both grep and map build a return list, regardless of their
context. This means you're making Perl go to the trouble of
>Replace
>
> EVIL: map { some;block;of;code;that;changes;$_ } @some_array;
>
>with
>
> GOOD: for (@some_array) { some;block;of;code;that;changes;$_ }
I guess I don't get it. Map returns a value and I ignore it; so what?
What side effects does this have? Which one's faster? I like to avoid
ob
> "Peter" == Peter Farrar <[EMAIL PROTECTED]> writes:
>> Replace
>>
>> EVIL: map { some;block;of;code;that;changes;$_ } @some_array;
>>
>> with
>>
>> GOOD: for (@some_array) { some;block;of;code;that;changes;$_ }
Peter> I guess I don't get it. Map returns a value and I ignore it; so what?
[EMAIL PROTECTED] wrote:
> >First, please don't use map in a void context for its side effects.
>
> Uh oh... What side effects? I use map like this all the time! What dread
> is looming in my future?
Do:
perldoc -f map
and read carefully the second paragraph of discussion:
Note that
>The foreach loop *will* be faster.
Good enough for me!
Thanks,
Peter
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
> >Replace
> >
> > EVIL: map { some;block;of;code;that;changes;$_ } @some_array;
> >
> >with
> >
> > GOOD: for (@some_array) { some;block;of;code;that;changes;$_ }
>
> I guess I don't get it. Map returns a value and I ignore it; so what?
> What side effects does this ha
On Wed, 12 Mar 2003 12:02:52 -0500, [EMAIL PROTECTED] (Susan
Aurand) wrote:
>I am getting an error can't locate ASN1.pm, I have tracked that down to - I need
>Convert-BER-1.25.tar.gz. I have downloaded the file. I cannot find the documents on
>this download,
>where to unzip and load, etc... Doe
From: zentara <[EMAIL PROTECTED]>
> On Wed, 12 Mar 2003 12:02:52 -0500, [EMAIL PROTECTED] (Susan
> Aurand) wrote:
>
> >I am getting an error can't locate ASN1.pm, I have tracked that down
> >to - I need Convert-BER-1.25.tar.gz. I have downloaded the file. I
> >cannot find the documents on this do
85 matches
Mail list logo