Re: IDE for Perl in Linux

2008-05-03 Thread Rob Dixon
Chas Owens wrote: > > Rodrigo Tavares wrote: >> >> Today I write my perls scripts with a simple editor. >> I found this link http://www.enginsite.com/Perl.htm, but it run only in >> Windows. >> >> This link http://www.solutionsoft.com/perl.htm, contain the for linux, but >> have to buy. >> >>

how to simplify this script

2008-05-03 Thread itshardtogetone
Hi, In the script below, I have an array @datas with its elements consisting of numbers like this :- my @datas = ( '1 2 3', '1 2 4', '1 2 7', '1 2 8', '1 2 9', '1 6 7', '1 7 12', '2 6 7', '4 5 10', '4 5 15' ); Out of the above list, I wish to generate a seperate array so that among the

Re: IDE for Perl in Linux

2008-05-03 Thread Levente Kovacs
On Sat, 3 May 2008 10:39:55 +0800 "J. Peng" <[EMAIL PROTECTED]> wrote: > On Sat, May 3, 2008 at 9:53 AM, Richard Lee <[EMAIL PROTECTED]> > wrote: > > > > Can you tell me what extra benefit emacs will provide to perl > > programmar? > > I have sawn that: > > Emacs == Emacs Makes a Computer Slow

Re: another help on input record separator clarity please

2008-05-03 Thread Chas. Owens
On Fri, May 2, 2008 at 9:48 PM, Richard Lee <[EMAIL PROTECTED]> wrote: snip > Chas, does this mean as long as we don't call another sub from the block we > declare local, we should be good. Correct? > I like using local on some of these variables.. for some reason. Most > likely due to mislea

Re: displaying inline images in HTML email

2008-05-03 Thread Rob Dixon
David Newman wrote: > I'm trying to include a PDF image both inline and as an attachment to an > HTML email. The MIME::Lite module supports this, and the documentation > even gives an example: > > http://tinyurl.com/uemf7 > > However, when I try this with the code below, the inline image doesn'

Re: displaying inline images in HTML email

2008-05-03 Thread David Newman
On 5/3/08 1:42 AM, Chas. Owens wrote: On Sat, May 3, 2008 at 1:26 AM, David Newman <[EMAIL PROTECTED]> wrote: I'm trying to include a PDF image both inline and as an attachment to an HTML email. The MIME::Lite module supports this, and the documentation even gives an example: snip I'm new to

Re: IDE for Perl in Linux

2008-05-03 Thread Chas. Owens
On Fri, May 2, 2008 at 9:53 PM, Richard Lee <[EMAIL PROTECTED]> wrote: snip > Can you tell me what extra benefit emacs will provide to perl programmar? snip In all seriousness, Emacs is very customizable. If you take the time to learn to use it properly it can be very handy; however, the lack of

Re: IDE for Perl in Linux

2008-05-03 Thread Chas. Owens
On Fri, May 2, 2008 at 10:39 PM, J. Peng <[EMAIL PROTECTED]> wrote: > On Sat, May 3, 2008 at 9:53 AM, Richard Lee <[EMAIL PROTECTED]> wrote: > > > > Can you tell me what extra benefit emacs will provide to perl programmar? > > I have sawn that: > > Emacs == Emacs Makes a Computer Slow snip Th

Re: displaying inline images in HTML email

2008-05-03 Thread Chas. Owens
On Sat, May 3, 2008 at 1:26 AM, David Newman <[EMAIL PROTECTED]> wrote: > I'm trying to include a PDF image both inline and as an attachment to an > HTML email. The MIME::Lite module supports this, and the documentation even > gives an example: snip > I'm new to tags. I've also tried this with "

Re: another help on input record separator clarity please

2008-05-03 Thread Joshua Hoblitt
Hi Richard, Your right, that won't actually work. I wasn't paying very close attention was I? It'd have to be something like this to actually work: my ($fgh) = $_ =~ /fgh\s+(\S+)/; -J -- On Fri, May 02, 2008 at 06:26:52PM -0400, Richard Lee wrote: > Joshua Hoblitt wrote: > >Richard, > > > >Th

Re: another help on input record separator clarity please

2008-05-03 Thread Dr.Ruud
"Dr.Ruud" schreef: > Richard Lee: >> my $fgh =~ /fgh\s+(\S+)/; >> my $ijk =~ /ijk\s+(\S+)/; >> my $lmk =~ /lmk\s+(\S+)/; > > You might want to use a hash: > > $fil{$1} = $2 while m/\b(fgh|ijk|lmk)\s+(\S+)/g; Looking at your input data, you could also do: $value{ $1 } =

Re: displaying inline images in HTML email

2008-05-03 Thread Gunnar Hjalmarsson
David Newman wrote: I'm trying to include a PDF image both inline and as an attachment to an HTML email. The MIME::Lite module supports this, and the documentation even gives an example: http://tinyurl.com/uemf7 However, when I try this with the code below, the inline image doesn't display.

Re: displaying inline images in HTML email

2008-05-03 Thread Gunnar Hjalmarsson
David Newman wrote: I'm trying to include a PDF image both inline and as an attachment to an HTML email. The MIME::Lite module supports this, and the documentation even gives an example: http://tinyurl.com/uemf7 However, when I try this with the code below, the inline image doesn't display.

Re: how to simplify this script

2008-05-03 Thread Richard Lee
[EMAIL PROTECTED] wrote: > Hi, > In the script below, I have an array @datas with its elements consisting of > numbers like this :- > > my @datas = ( > '1 2 3', '1 2 4', '1 2 7', '1 2 8', '1 2 9', '1 6 7', > '1 7 12', '2 6 7', '4 5 10', '4 5 15' > ); > > Out of the above list, I wish to

Re: IDE for Perl in Linux

2008-05-03 Thread Chas. Owens
On Sat, May 3, 2008 at 1:45 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: snip > Komodo Edit (the free version of Komodo) is a fine piece of software, and > even > Komodo IDE for £150 is cheap compared with comparable commercial software, > and > it includes an invaluable regex debugger. snip Yeah

Re: how to simplify this script

2008-05-03 Thread Richard Lee
[EMAIL PROTECTED] wrote: > Hi, > In the script below, I have an array @datas with its elements consisting of > numbers like this :- > > my @datas = ( > '1 2 3', '1 2 4', '1 2 7', '1 2 8', '1 2 9', '1 6 7', > '1 7 12', '2 6 7', '4 5 10', '4 5 15' > ); > > Out of the above list, I wish to

Re: how to simplify this script

2008-05-03 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: In the script below, I have an array @datas with its elements consisting of numbers like this :- Out of the above list, I wish to generate a seperate array so that among their elements, there should not be any 2 numbers that can match and so the output should be :-

Re: another help on input record separator clarity please

2008-05-03 Thread Chas. Owens
On Sat, May 3, 2008 at 6:40 AM, Dr.Ruud <[EMAIL PROTECTED]> wrote: snip > $value{ $1 } = $2 while m/^(\S+)[[:blank:]]+(\S+)/mg; > > or even > > $value{ $1 } = $2 while m/^(\S+)[[:blank:]]*(\S*)/mg; snip Is there a reason I am missing to use [[:blank:]] over [ \t]? -- Chas. Owens won

Re: displaying inline images in HTML email

2008-05-03 Thread Jenda Krynicky
From: Rob Dixon <[EMAIL PROTECTED]> > David Newman wrote: > The src attribute of an HTML element must be the URI of an image > resource > acceptable to the HTML renderer on your platform. I have never heard of > anything > that supports formats other than GIF, JPG or PNG files,

Re: Comparing files with regular expressions

2008-05-03 Thread Jenda Krynicky
From: "Chas. Owens" <[EMAIL PROTECTED]> > On Fri, May 2, 2008 at 10:44 AM, rubinsta <[EMAIL PROTECTED]> wrote: > snip > > Any thoughts as to why > > some of the matches are getting missed? > snip > > Not off hand. I will extract your code and do some tests. Can you > send me y

Re: displaying inline images in HTML email

2008-05-03 Thread Chas. Owens
On Sat, May 3, 2008 at 10:04 AM, David Newman <[EMAIL PROTECTED]> wrote: snip > Next question: How to display PDFs inline? snip Well, off hand, I would say you would need to use the object tag* instead of the img tag and be using an email client that works with object tags; however, you should ex

Re: displaying inline images in HTML email

2008-05-03 Thread Chas. Owens
On Sat, May 3, 2008 at 4:46 PM, Chas. Owens <[EMAIL PROTECTED]> wrote: > On Sat, May 3, 2008 at 10:04 AM, David Newman <[EMAIL PROTECTED]> wrote: > snip > > > Next question: How to display PDFs inline? > snip > > Well, off hand, I would say you would need to use the object tag* > instead of th

Re: Comparing files with regular expressions

2008-05-03 Thread Chas. Owens
On Sat, May 3, 2008 at 4:42 PM, Jenda Krynicky <[EMAIL PROTECTED]> wrote: snip > > [stuff about how two arg open is more dangerous than three arg open > And that means you were lucky. If the $file contained something like > "|rm -rf /" or "rm -rf / |" ... snip Nah, you would be lucky if that wer

Re: Comparing files with regular expressions

2008-05-03 Thread Jenda Krynicky
From: "Chas. Owens" <[EMAIL PROTECTED]> > On Sat, May 3, 2008 at 4:42 PM, Jenda Krynicky <[EMAIL PROTECTED]> wrote: > snip > > > [stuff about how two arg open is more dangerous than three arg open > > And that means you were lucky. If the $file contained something like > > "|rm -rf /" or "rm -rf

Re: how to simplify this script

2008-05-03 Thread itshardtogetone
From: "Richard Lee" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Sunday, May 04, 2008 3:17 AM Subject: Re: how to simplify this script I don't have the solution yet but shouldn't the answer be 1 6 7 and 4 5 10 only ? it's printing out 1 2 3 as well which is wrong? Thanks Richard. The

Re: how to simplify this script

2008-05-03 Thread itshardtogetone
Hi Gunnar and Members I am very thrilled with your solutions. Is 'LOOP' as in >> LOOP: foreach ( @datas ) { <<= a function or a command etc. I could not find this function in http://perldoc.perl.org/index-functions.html#L Thanks - Original Message - From: "Gunnar Hjalm

Re: how to simplify this script

2008-05-03 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: Hi Gunnar and Members I am very thrilled with your solutions. Is 'LOOP' as in >> LOOP: foreach ( @datas ) { <<= a function or a command etc. No, it's just the name I chose to give the outer foreach loop to be able to refer to it from within the inner for

Re: Comparing files with regular expressions

2008-05-03 Thread Rob Dixon
rubinsta wrote: > Hello, > > I'm a Perl uber-novice and I'm trying to compare two files in order to > exclude items listed on one file from the complete list on the other > file. What I have so far prints out a third file listing everything > that matches the exclude file from the complete file (

Re: IDE for Perl in Linux

2008-05-03 Thread Matthew Whipple
Dr.Ruud wrote: Rodrigo Tavares schreef: Anybody knows a simple and good IDE Perl for Linux ? http://e-p-i-c.sourceforge.net/ I'd been using gvim but have recently decided to invest in getting familiar with the eclipse framework (which that link would be part of) since the exten

Re: Comparing files with regular expressions

2008-05-03 Thread Chas. Owens
On Sat, May 3, 2008 at 5:57 PM, Jenda Krynicky <[EMAIL PROTECTED]> wrote: > From: "Chas. Owens" <[EMAIL PROTECTED]> > > > On Sat, May 3, 2008 at 4:42 PM, Jenda Krynicky <[EMAIL PROTECTED]> wrote: > > snip > > > > [stuff about how two arg open is more dangerous than three arg open > > > And that

Re: how to simplify this script

2008-05-03 Thread Chas. Owens
On Sat, May 3, 2008 at 6:44 PM, <[EMAIL PROTECTED]> wrote: snip > The output should include '1 2 3'. > Therefore I want the output to be > > 1 2 3 > 1 6 7 > 4 5 10 > > It should include '1 2 3' because '1 2 3', '1 2 4', '1 2 7', '1 2 8', '1 > 2 9' = '1 2'(the common number from the list) +

Re: how to simplify this script

2008-05-03 Thread Chas. Owens
On Sat, May 3, 2008 at 7:03 PM, <[EMAIL PROTECTED]> wrote: > Hi Gunnar and Members > > I am very thrilled with your solutions. Is 'LOOP' as in >> LOOP: > foreach ( @datas ) { <<= > a function or a command etc. I could not find this function in > http://perldoc.perl.org/index-function

how to reun perl script on other pc without having to install perl

2008-05-03 Thread itshardtogetone
Hi, What must I do to my perl script so that my friends can run my perl script from their computer, using windows as the operating system, without having to install perl into their system. Technically, this conversion is it called compiling? Thanks

Re: how to reun perl script on other pc without having to install perl

2008-05-03 Thread J. Peng
On Sun, May 4, 2008 at 12:58 PM, <[EMAIL PROTECTED]> wrote: > What must I do to my perl script so that my friends can run my perl script > from their computer, using windows as the operating system, without having to > install perl into their system. Sorry to tell you, it's impossible. Trying

Re: how to reun perl script on other pc without having to install perl

2008-05-03 Thread Chas. Owens
On Sun, May 4, 2008 at 12:58 AM, <[EMAIL PROTECTED]> wrote: > Hi, > What must I do to my perl script so that my friends can run my perl script > from their computer, using windows as the operating system, without having to > install perl into their system. > Technically, this conversion is it

Re: how to reun perl script on other pc without having to install perl

2008-05-03 Thread Chas. Owens
On Sun, May 4, 2008 at 1:09 AM, J. Peng <[EMAIL PROTECTED]> wrote: > On Sun, May 4, 2008 at 12:58 PM, <[EMAIL PROTECTED]> wrote: > > What must I do to my perl script so that my friends can run my perl > script from their computer, using windows as the operating system, without > having to inst

howto simplfy this regex if ($string =~/^$match | $match | $match$/g){

2008-05-03 Thread itshardtogetone
Hi, How do I simplify the regex below so that it matches only the number 1, henceforth it should return false if I match $string with $match. use strict; use warnings; my $string = "10 11 12 13 40"; my $match = 1; if ($string =~/^$match | $match | $match$/g){ print "match"; }else{ print

Re: how to reun perl script on other pc without having to install perl

2008-05-03 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: What must I do to my perl script so that my friends can run my perl script from their computer, using windows as the operating system, without having to install perl into their system. Technically, this conversion is it called compiling? http://search.cpan.org/perldoc

Re: howto simplfy this regex if ($string =~/^$match | $match | $match$/g){

2008-05-03 Thread Chas. Owens
On Sun, May 4, 2008 at 1:19 AM, <[EMAIL PROTECTED]> wrote: > Hi, > How do I simplify the regex below so that it matches only the number 1, > henceforth it should return false if I match $string with $match. > > use strict; > use warnings; > > my $string = "10 11 12 13 40"; > my $match = 1; >

Re: howto simplfy this regex if ($string =~/^$match | $match | $match$/g){

2008-05-03 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: How do I simplify the regex below so that it matches only the number 1, henceforth it should return false if I match $string with $match. use strict; use warnings; my $string = "10 11 12 13 40"; my $match = 1; if ($string =~/^$match | $match | $match$/g){ Do you pos

Re: howto simplfy this regex if ($string =~/^$match | $match | $match$/g){

2008-05-03 Thread Chas. Owens
On Sun, May 4, 2008 at 1:45 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: snip > > if ($string =~/^$match | $match | $match$/g){ snip > my $match = qr(\b1\b); snip Ah, I was missing something, the spaces. This is much better than my answer. -- Chas. Owens wonkden.net The most important

Re: howto simplfy this regex if ($string =~/^$match | $match | $match$/g){

2008-05-03 Thread Gunnar Hjalmarsson
Chas. Owens wrote: On Sun, May 4, 2008 at 1:45 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: snip if ($string =~/^$match | $match | $match$/g){ snip my $match = qr(\b1\b); snip Ah, I was missing something, the spaces. This is much better than my answer. I think this is even safer: