Re: Replacing variable data between fields - Revisited.

2003-09-27 Thread John W. Krahn
Perlwannabe wrote: > > I posted a problem to the mailing list with a similar question I had some > time ago regarding replacing data between fields. Unfortunately, I am > having a difficult time with the problem. I am including the code and a > sample of the data. Could someone please give me a

Re: assigning a multi-dimensional array (mda) to an mda?

2003-09-27 Thread R. Joseph Newton
Kevin Pfeiffer wrote: > I thought the easy way to do this is to first assign my entire 'en' data > structure to the 'de' structure and then add 'de' values as available. > > So I did this: > > $text{'main'}{'de'} = $text{'main'}{'en'}; > > $text{'main'}{'de'} = { # German labels >

Re: how to reuse sub

2003-09-27 Thread R. Joseph Newton
Zanardi2k3 wrote: > [EMAIL PROTECTED] wrote: > > > OK, I added the return line to sub. But I'm getting an error on the > > line require "mycommon.pl" of the tst.pl file. It say something about > > @INC cannot find mycommon.pl > > You have two choices: > > 1. Your required file must be in @INC, i.e

Replacing variable data between fields - Revisited.

2003-09-27 Thread perlwannabe
I posted a problem to the mailing list with a similar question I had some time ago regarding replacing data between fields. Unfortunately, I am having a difficult time with the problem. I am including the code and a sample of the data. Could someone please give me a clue as to why this is not wo

Re: Perl Newbie - Need good book recommendation

2003-09-27 Thread Marc Adler
* Ed Yost <[EMAIL PROTECTED]> [2003-09-27 14:29]: > Hi all, > > I am a complete newbie to perl and have no programming experience. Do > any of you have a good recommendation on a book or resource for a > beginner such as myself? I'm using O'Reilly's _Learning Perl_ and it's very clear. Like you

RH/debian regular expression weirdness

2003-09-27 Thread Ethan Alpert
Hello! My first post. Basically I have this script that runs differently on my RH box that it does on by debian box. I'm hopeing someone might be able to point me in the right direction. Both machines are running perl v5.8.0 yet something is very different and I suspect something's wrong with my

RE: Perl Newbie - Need good book recommendation

2003-09-27 Thread TN
Hi, I recommend not buying anything. After all, perl itself including all sources are free, and they come will extensive documentation, while the sources are the ultimate reference. All you need is online and free and can be found by googling. The approach I recommend, is: read one or two fre

Re: breaking the loop

2003-09-27 Thread James Edward Gray II
On Saturday, September 27, 2003, at 01:57 PM, R. Joseph Newton wrote: This is the first time I have seen the diamond or in-place editing operator used well. Usually I blanch when I see them--the diamond conjures up the image of some poor shmuck typing in lists of filenames at the command-line

Perl Newbie - Need good book recommendation

2003-09-27 Thread Ed Yost
Hi all, I am a complete newbie to perl and have no programming experience. Do any of you have a good recommendation on a book or resource for a beginner such as myself? Thanks, Ed -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Should loops return a value?

2003-09-27 Thread TN
I've been thinking about this issue more generally. Programming language enhancement does not seem to be especially a beginner's topic. But a beginner may not have biases that inhibit greater insight; and such insight could also be well served by a sufficient conceptual basis and historical knowle

perl query

2003-09-27 Thread Al Green
Hi Folks I am new to perl and would like to be pointed in the right direction. I need to search for an ip number stored in a file/files at /home/www/* I tried grep -i 'russ' /home/www/* but it did not work. Please point me to the tutorial or some othe site that will help me. cheers marty --

Re: Should loops return a value?

2003-09-27 Thread Ville Jungman
A well-named function, on the other hand, tells you exactly what to expect. Ealy binding of parameters to local variables also adds clarity by providing concrete meaning to the parameters offered. Loops returning values would competite more with greps and maps than functions. You are right that s

Re: Should loops return a value?

2003-09-27 Thread Ville Jungman
The first ime I heard about "Object Oriented Programming", it sounded like a silly-ass buzzword. The first time I looked at an example of OO, I thought, "What a great idea. Have your programming constructs look like objects in the real world!" I think that definitely they are a natural way. B

Re: Newbie Question! Can Someone help?

2003-09-27 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Hello Fellow Members, > > I'm installing a script on my domain for tech support for my program. > > I understand all the install instructions except this? > > For sendmail users, edit your aliases file and add this line. > s

RE: Conceptual -- Spam stopper script

2003-09-27 Thread TN
Vipul Ved Prakash has done a great job helping to stop spam with his collaborative spam filtering system that was originally called "Vipul's Razor". I read it was developed in perl! It's available for mail gateways and as an Outlook plugin from Cloudmark (http://www.cloudmark.com). The SpamNet O

Re: PERL DNS Lookup's using "Socket"

2003-09-27 Thread George Schlossnagle
On Saturday, September 27, 2003, at 03:47 PM, Airman wrote: I'm using the following PERL code to do some DNS queries. Anyone know how to specify what "dns or nameserver" to use instead of what is in /etc/resolv.conf (unix)? Or is there a better way in PERL? You can't specify it if you're using g

PERL DNS Lookup's using "Socket"

2003-09-27 Thread Airman
I'm using the following PERL code to do some DNS queries. Anyone know how to specify what "dns or nameserver" to use instead of what is in /etc/resolv.conf (unix)? Or is there a better way in PERL? MAIN: { use Socket; # Get Server IP Address of domain name $host=gethostbyname($domainn

Re: Conceptual -- Spam stopper script

2003-09-27 Thread R. Joseph Newton
Jerry Rocteur wrote: > Thanks Guys... > > Perhaps one day the SMTP protocol will be rewritten to perform checks > on the sender, perhaps one day . Yes, hopefully. SMTP as we know it is as good as dead, due to this velnerability. Unfortunately, there is so much invested in it that it will ta

Re: OT: Conceptual -- Spam stopper script

2003-09-27 Thread R. Joseph Newton
Jerry Rocteur wrote: > Hi, > > I've been analyzing my SPAM I don't like it either, but please don't keep shouting. It makes your message look like ... well, spam. > by replying to it lately and find that MOST > email addresses where the SPAM originates do not exist.. Nothing new > here.. > > Wh

Newbie Question! Can Someone help?

2003-09-27 Thread bootsman
Hello Fellow Members, I'm installing a script on my domain for tech support for my program. I understand all the install instructions except this? For sendmail users, edit your aliases file and add this line. support: root,"|/path/to/your/openticket.pl" and than run, "newaliases" I

Re: breaking the loop

2003-09-27 Thread R. Joseph Newton
Jeff 'japhy' Pinyan wrote: > You can do this without opendir(), and without grep() or the for loop. > > { > local $^I = ".bak"; > local @ARGV = glob "$directory/*.txt"; > while (<>) { > s/foo/bar/g; > print; > } > } > > Ta da! > Score one for Japhy! This is the fi

assigning a multi-dimensional array (mda) to an mda?

2003-09-27 Thread Kevin Pfeiffer
Hi all, Quiet but not idle... I'm working on localization -- placing all text labels, etc. into one subsection; this made things so easy I decided to add the option of additional languages to my project, but... I have something like: $text{'main'}{'en'} = { # English labels

Re: how to reuse sub

2003-09-27 Thread Zanardi2k3
[EMAIL PROTECTED] wrote: > OK, I added the return line to sub. But I'm getting an error on the > line require "mycommon.pl" of the tst.pl file. It say something about > @INC cannot find mycommon.pl You have two choices: 1. Your required file must be in @INC, i.e. in the path where perl.exe look

RE: Pop3 to SMTP

2003-09-27 Thread Zanardi2k3
[EMAIL PROTECTED] (Wiggins D'Anconia) wrote: > http://catb.org/~esr/fetchmail/ Well, i'm not a C programmer so it's still "closed-source" to me... :-) but maybe it is more robust and tweakable than pullmail. I'll try it soon. Next i'll go deeper into Mail::Box docs. I already scrolled through it

Problem installing Image::Imlib2 module

2003-09-27 Thread Indraniel Das
Hello. I'm a perl newbie and am trying to install the Image::Imlib2 version 1.00 on my linux system. However, I am encountering problems during the "Build" process. I first installed imlib2-1.1.0 on my system and that went well. I then tried installing the Image::Imlib2 module. The first two com

Re: subroutine problem

2003-09-27 Thread Ged
Jeff / Joseph, Thanks for you replies. Appologies about commenting out the 'use strict'. I was playing about with the program and was checking the different errors I got with and without it. Didn't realised it was still commented when I posted. Its funny, but I spent about an hour trying to get

Re: how to reuse sub

2003-09-27 Thread perl
OK, I added the return line to sub. But I'm getting an error on the line require "mycommon.pl" of the tst.pl file. It say something about @INC cannot find mycommon.pl any help here? How can I reuse a subroutine? My environment is redhat 9, apache2, perl-5.8.0-88, mod_perl-1.99_07-5. I've tried t

Re: Cross-site scripting (was Re: )

2003-09-27 Thread R. Joseph Newton
zsdc wrote: > Chuck Fox wrote: > > > >> Sometimes "dumb users" can be quite creative: > >> > >> >> href="http://sitefinder.verisign.com/lpc?url='%3E%3Cimg%20src=http://www.patrick.fm/boobies/boobies.php?text=VeriSign%3E";>I > >> Love VeriSign > >> [...] > > > > No matter how foolproof you make,

Re: substr parsing mask

2003-09-27 Thread Jeff 'japhy' Pinyan
On Sep 27, Jeff 'japhy' Pinyan said: >On Sep 26, [EMAIL PROTECTED] said: > >>Does anyone have a short routine for displaying mask on some values and >>displaying the value of the last four? For example, alot of site display >>credit card numbers like 1234 which shows only the last four. >> >>I

Re: how to reuse sub

2003-09-27 Thread Jeff 'japhy' Pinyan
On Sep 26, [EMAIL PROTECTED] said: >#!/usr/bin/perl >#return a value wrapped by single quotes >#should this be declare package something? >sub doWrap >{ my $retval; > > if(length($_[0]) == 0) { $retval = "null"; } > else { $retval = "'" . $_[0] . "'"; } >} You need to RETURN $retval. It's alwa

Re: substr parsing mask

2003-09-27 Thread Jeff 'japhy' Pinyan
On Sep 26, [EMAIL PROTECTED] said: >Does anyone have a short routine for displaying mask on some values and >displaying the value of the last four? For example, alot of site display >credit card numbers like 1234 which shows only the last four. > >I know how to use the substr but what about re