Re: looping through complicated hashes..

2006-09-07 Thread Ashok Varma
Hi Michael, Following is one way ... Here is am assuming that you have dumped that data into a array named '@your_array' which contains each line in array references(array of arrays). $table = new HTML::T

Re: looping through complicated hashes..

2006-09-07 Thread Michael Alipio
ignore this one.. I've already figured out how. thanks. --- Michael Alipio <[EMAIL PROTECTED]> wrote: > Hi, > > I have an input file with 7 columns each line. Words > are separated with 1 or more spaces.. > Now, I want each of these lines placed into > HTML::Table's rows. > > The HTML::Table ha

Re: Removing malicious code

2006-09-07 Thread John W. Krahn
Owen wrote: > I have a cgi script that processes a form in which the following line of code > is found > > $name =~ s/[`\\"_|!\$\.\^]//g; #remove likely malicious bad characters > > Just wondering if there is a better way to do this as I suspect I am a little > naive. > > Need to pass only the

Removing malicious code

2006-09-07 Thread Owen
I have a cgi script that processes a form in which the following line of code is found $name =~ s/[`\\"_|!\$\.\^]//g; #remove likely malicious bad characters Just wondering if there is a better way to do this as I suspect I am a little naive. Need to pass only the low ascii set [A..Za..z] and

looping through complicated hashes..

2006-09-07 Thread Michael Alipio
Hi, I have an input file with 7 columns each line. Words are separated with 1 or more spaces.. Now, I want each of these lines placed into HTML::Table's rows. The HTML::Table has something like this. each row (with 7 cells) is encolsed with []. I want each row, populated with each line in my inpu

Re: New-Line in Regular Expression

2006-09-07 Thread John W. Krahn
Romeo Theriault wrote: > Hello, Hello, > I'm trying to match this line (or more than one) starting from > the words "user picard..." > > 8/28/2006 1:04:41 PM: Retrieving mail from host mail.maine.edu > [130.111.32.22], user picard... > 8/28/2006 1:04:45 PM: Mail retrieval failed, reason: POP3

Re: Sorting on HoHoH

2006-09-07 Thread John W. Krahn
Hardly Armchair wrote: > Hello List, Hello, > I have a data structure like so: > > %p_mod = { ^ You are using the wrong punctuation. That would produce a warning if you had warnings enabled. > 'A' => { > 'fingers' => { > '

Sorting on HoHoH

2006-09-07 Thread Hardly Armchair
Hello List, I have a data structure like so: %p_mod = { 'A' => { 'fingers' => { '4' => 'ABSFMQS', '5' => 'SMTFQNL', }, 'name'=> '8-H34'

Re: New-Line in Regular Expression

2006-09-07 Thread Rob Dixon
Romeo Theriault wrote: > > Hello, I'm trying to match this line (or more than one) starting from > the words "user picard..." > > 8/28/2006 1:04:41 PM: Retrieving mail from host mail.maine.edu [130.111.32.22], user picard... > 8/28/2006 1:04:45 PM: Mail retrieval failed, reason: POP3 Host did no

Re: New-Line in Regular Expression

2006-09-07 Thread D. Bolliger
Romeo Theriault am Donnerstag, 7. September 2006 22:42: > Hello, I'm trying to match this line (or more than one) starting from > the words "user picard..." > > 8/28/2006 1:04:41 PM: Retrieving mail from host mail.maine.edu > [130.111.32.22], user picard... > 8/28/2006 1:04:45 PM: Mail retrieval fa

RE: New-Line in Regular Expression

2006-09-07 Thread Charles K. Clarkson
Romeo Theriault wrote: : Hello, I'm trying to match this line (or more than one) starting from : the words "user picard..." : : 8/28/2006 1:04:41 PM: Retrieving mail from host mail.maine.edu : [130.111.32.22], user picard... : 8/28/2006 1:04:45 PM: Mail retrieval failed, reason: POP3 Host did : n

New-Line in Regular Expression

2006-09-07 Thread Romeo Theriault
Hello, I'm trying to match this line (or more than one) starting from the words "user picard..." 8/28/2006 1:04:41 PM: Retrieving mail from host mail.maine.edu [130.111.32.22], user picard... 8/28/2006 1:04:45 PM: Mail retrieval failed, reason: POP3 Host did not acknowlege password and retu

Re: regular expression question

2006-09-07 Thread chen li
> On 9/7/06, chen li <[EMAIL PROTECTED]> wrote: > > Hi Adriano, > > > > The line code you provide doesn't work on my > computer > > but based on what you say I change it into this > line > > code and it works. > > > On 9/7/06, Rob Dixon <[EMAIL PROTECTED]> wrote: > > Why did I have to test this c

Re: Create HTML code with perl

2006-09-07 Thread JupiterHost.Net
Brian McKee wrote: On Monday 04 September 2006 00:34, Webmaster Adil wrote: Hi All I need print HTML codes with perl: If you want to HTMLify plain text, try Text::InHTML it even does syntax highlighting (if available) if the plain text is HTML, Perl, XML, and about 95 +/- other ones.

Re: regular expression question

2006-09-07 Thread Adriano Ferreira
On 9/7/06, Rob Dixon <[EMAIL PROTECTED]> wrote: It's very bad form to post something to the list that simply doesn't work. This won't even compile: Type of arg 1 to shift must be array (not concatenation (.) or string) at E:\Perl\source\xx.pl line 2, near "" ")" Ok, my fault. I was hasty to

Re: Running the same perl script on Win32 and Unix

2006-09-07 Thread Mahdi A Sbeih
Thanks Rob, this worked just perfect. Yes, you picked the right first name, thanks allot. -Mahdi. Rob Dixon wrote: Mahdi A Sbeih wrote: > Hi there, > > I have a perl script that will run on both Unix and Windows platforms, > the only problem I am having is below: > > use Win32::Process; > >

Re: Running the same perl script on Win32 and Unix

2006-09-07 Thread Rob Dixon
Mahdi A Sbeih wrote: > Hi there, > > I have a perl script that will run on both Unix and Windows platforms, > the only problem I am having is below: > > use Win32::Process; > > I have to use the above only for windows since later in my script: > if ($platform eq 'UNIX') { >system("$Cmd

Re: Running the same perl script on Win32 and Unix

2006-09-07 Thread jeffhua
  I don't want to maintain two scripts, and it seems I cann't do something like this on the top of the script:  if ($platform eq 'WINDOWS') {    use Win32::Process;  }    Anyone can help?  Hi,it seems that you want to put them in BEGIN block.ie, BEGIN { use vars qw/$OS/; $OS = $^O eq '

Running the same perl script on Win32 and Unix

2006-09-07 Thread Mahdi A Sbeih
Hi there, I have a perl script that will run on both Unix and Windows platforms, the only problem I am having is below: use Win32::Process; I have to use the above only for windows since later in my script: if ($platform eq 'UNIX') { system("$Cmd > /dev/null 2>&1 &"); } elsi

Re: regular expression question

2006-09-07 Thread Rob Dixon
chen li wrote: > > I need a regular expression to process some data but > get stuck. I wonder if anyone here might have a clue. > > input: > my $line='group A 1 2 3 4';# separated by space > > results: > my @data=("group A ",1,2,3,4); My offering: my @data = $line =~ /\S+/g; splice @data

How to retrieve specific file version properties?

2006-09-07 Thread DJ Gruby
Hi everybody! Is anyone here able to help me with the following problem...? I need to get some version info properties from an executable. I tried to achieve this goal with Perl module Win32::File::VersionInfo, but even though it works great when retrieving standard version attributes like "File

Re: regular expression question

2006-09-07 Thread Rob Dixon
Adriano Ferreira wrote: > > On 9/6/06, chen li <[EMAIL PROTECTED]> wrote: > >> I need a regular expression to process some data but >> get stuck. I wonder if anyone here might have a clue. >> >> input: >> my $line='group A 1 2 3 4';# separated by space >> >> results: >> my @data=("group A ",1,

Re: Position Weight Matrix of Set of Strings with Perl

2006-09-07 Thread Rob Dixon
Wijaya Edward wrote: > > From: Rob Dixon >> >> use strict; >> use warnings; >> >> my %pwm; >> >> while () { >>my $col = 0; >>foreach my $c (/\S/g) { >> $pwm{$c}[$col++]++; >>} >> } >> >> foreach my $freq (values %pwm) { >>$_ = $_ ? $_ / keys %pwm : 0 foreach @$freq; >> } >> >>

Re: Create HTML code with perl

2006-09-07 Thread Brian McKee
On Monday 04 September 2006 00:34, Webmaster Adil wrote: > Hi All > > > > I need print HTML codes with perl: > Look at the CGI module For example - here's a chunk of code from a website I wrote print start_span({-class=>'contact'}), h3('Team Contact Information'), start_table(), T