Re: special character regex match

2011-05-05 Thread Brian Fraser
On Thu, May 5, 2011 at 7:55 AM, Rob Coops wrote: > /\/|%|\$|\#\#|\s/g > Why not just a character class? It's usually a bad idea to use alternation in these cases. m!^[/%#\s\$]+$! should do the trick. Or if there must be three #'s in a row, perhaps m!^ (?: [/%\s\$]+ | \#{3} )+ $!x ? In any case,

Re: utf8 and md5.

2011-05-05 Thread apm
Answer was: my $bytes=encode("utf16LE", $pass); my $md5=uc(md5_hex($bytes)); 06.05.2011 03:29, Natal Ngétal пишет: Le jeudi 05 mai 2011 à 10:34:51, apm a écrit : For example, that c# code return C3-1A-C6-05-79-3F-58-0B-38-6C-0F-B5-3F-1B-97-75 for string 12345 With string 12345. I have

Re: cache and the interpreter

2011-05-05 Thread Uri Guttman
> "MM" == Mike McClain writes: MM> Here's a simple example that illustrates the problem I've run into: MM> perl -le' MM> show(); MM> { my @fibs = (0,1,1); my ($x, $y) = (1,2); MM> sub show MM> { print "x=$x\ty=$y\t\$#fibs=$#fibs\tfibs=@fibs\tscalar \@fibs = ", MM>

cache and the interpreter

2011-05-05 Thread Mike McClain
Here's a simple example that illustrates the problem I've run into: perl -le' show(); { my @fibs = (0,1,1); my ($x, $y) = (1,2); sub show { print "x=$x\ty=$y\t\$#fibs=$#fibs\tfibs=@fibs\tscalar \@fibs = ", scalar @fibs; }; $fibs[$#fibs+1] = 2; } show(); ' x= y=

Re: utf8 and md5.

2011-05-05 Thread Natal Ngétal
Le jeudi 05 mai 2011 à 10:34:51, apm a écrit : > For example, that c# code return > C3-1A-C6-05-79-3F-58-0B-38-6C-0F-B5-3F-1B-97-75 > for string 12345 With string 12345. I have try with md5sum and md5_hex(). echo -n 12345 | md5sum 827ccb0eea8a706c4c34a16891f84e7b I have the same result with md5_h

Re: [OFF] OSS Perl Shopping Carts

2011-05-05 Thread sono-io
On Apr 28, 2011, at 6:49 PM, Jeff Pang wrote: >>Are there any current open source Perl shopping carts out there? The >> only carts I've been able to find are either ancient or are written in PHP. > > I don't know there is such one. That's too bad. Back in 2005, I read an artic

Re: how to redefing the default list seperator

2011-05-05 Thread John W. Krahn
eventual wrote: Hi, How do I change the default list seperator. I tried the following but it wont work. Thanks $testing = "anything in here"; @rubbish = $testing; You are assigning one scalar value to the whole array so only $rubbish[0] will have any content. $" = "in"; This is the corr

Re: combinations & permutation : how to generate a list of numbers

2011-05-05 Thread fakessh
Le jeudi 5 mai 2011 18:43, Paul Johnson a écrit : > On Thu, May 05, 2011 at 08:20:13AM -0700, eventual wrote: > > Hi, Concerning the game Lotto, how do I generate a list of 6 numbers out > > of 12 numbers,  eg > > > > given the 12 numbers as 1,2,3,4,5,6,7,8,9,10,11,12 > > the list of 6 numbers goes

Re: utf8 and md5.

2011-05-05 Thread apm
just md5_hex( doesnt work. For example, that c# code return C3-1A-C6-05-79-3F-58-0B-38-6C-0F-B5-3F-1B-97-75 for string 12345 05.05.2011 21:59, Lawrence Statton : On 05/05/2011 10:53 AM, apm wrote: I have old legacy code on .net 1.1 c# Byte[] clearBytes = new UnicodeEncoding().GetBytes(cl

Re: combinations & permutation : how to generate a list of numbers

2011-05-05 Thread Paul Johnson
On Thu, May 05, 2011 at 08:20:13AM -0700, eventual wrote: > Hi, Concerning the game Lotto, how do I generate a list of 6 numbers out of > 12 > numbers,  eg > > given the 12 numbers as 1,2,3,4,5,6,7,8,9,10,11,12 > the list of 6 numbers goes like this :- > 1,2,3,4,5,6 > 1,2,3,4,5,7 > 1,2,3,4,5,8

Re: Rounding Date/Time

2011-05-05 Thread Pete Smith
On May 2, 9:46 am, lm7...@gmail.com (Matt) wrote: Have a date: 2011-05-02-16:40:51 Using this to get it: $tm = gmtime; $time_stamp = sprintf "%04d-%02d-%02d-%02d:%02d:%02d", $tm->year + 1900, $tm->mon + 1, $tm->mday, $tm->hour, $tm->min, $tm->sec; print "$time_stamp\n"; I need to r

Re: utf8 and md5.

2011-05-05 Thread Lawrence Statton
On 05/05/2011 10:53 AM, apm wrote: I have old legacy code on .net 1.1 c# Byte[] clearBytes = new UnicodeEncoding().GetBytes(cleanString); Byte[] hashedBytes = ((HashAlgorithm) CryptoConfig.CreateFromName("MD5")).ComputeHash(clearBytes); return BitConverter

utf8 and md5.

2011-05-05 Thread apm
I have old legacy code on .net 1.1 c# Byte[] clearBytes = new UnicodeEncoding().GetBytes(cleanString); Byte[] hashedBytes = ((HashAlgorithm) CryptoConfig.CreateFromName("MD5")).ComputeHash(clearBytes); return BitConverter.ToString(hashedBytes); how convert

combinations & permutation : how to generate a list of numbers

2011-05-05 Thread eventual
Hi, Concerning the game Lotto, how do I generate a list of 6 numbers out of 12 numbers,  eg given the 12 numbers as 1,2,3,4,5,6,7,8,9,10,11,12 the list of 6 numbers goes like this :- 1,2,3,4,5,6 1,2,3,4,5,7 1,2,3,4,5,8 1,2,3,4,5,9 1,2,3,4,5,10 . etc etc Thanks

Re: how to redefing the default list seperator

2011-05-05 Thread Shawn H Corey
On 11-05-05 10:10 AM, eventual wrote: Hi, How do I change the default list seperator. I tried the following but it wont work. Thanks $testing = "anything in here"; @rubbish = $testing; $" = "in"; print "\@rubbish now have " . $#rubbish + 1 . " elements\n"; Try: @rubbish = qw( anything in her

how to redefing the default list seperator

2011-05-05 Thread eventual
Hi, How do I change the default list seperator. I tried the following but it wont work. Thanks $testing = "anything in here"; @rubbish = $testing; $" = "in"; print "\@rubbish now have " . $#rubbish + 1 . " elements\n";

Re: command formatting

2011-05-05 Thread Rob Dixon
On 05/05/2011 12:22, Irfan Sayed wrote: > > i have command like this: > > signtool.exe sign /f "\\bvctrlbm18-\Digital Signature\sympfx.pfx" /p "test" > "C:\workspace\ESM\Convergence\Trunk\bin\ESMPolicyToCCSStandard.exe" > > i need to execute this command in perl script. i need to use qx/comman

command formatting

2011-05-05 Thread Irfan Sayed
 Hi all, i have command like this: signtool.exe sign /f "\\bvctrlbm18-\Digital Signature\sympfx.pfx" /p "test"  "C:\workspace\ESM\Convergence\Trunk\bin\ESMPolicyToCCSStandard.exe" i need to execute this command in perl script. i need to use qx/command/; but i am stuck in formatting this command

Re: special character regex match

2011-05-05 Thread Rob Coops
Ok let me try to understand the question. You have a form (on an HTML page or inside an application, command line or graphics?), this form contains a textarea that should not allow users to freely enter text but the input should be scanned for "bad" characters, if those are found the user should r

Re: special character regex match

2011-05-05 Thread Rob Dixon
On 05/05/2011 10:56, Agnello George wrote: Hi I got a form with and users and insert in textarea words like : /word_word2/wordword_word.txt /word1_word/wordword_word2.txt /word_word/word2word_word.txt but they should not be able to type the following in the text area / % $ ### space

Re: Open existing HTML page from perl script

2011-05-05 Thread Rob Dixon
On 05/05/2011 08:31, Geospectrum wrote: > > I am putting together a simple website and would like visitors to be > able to type a number into a form (say 1234) and a perl script should > run open an existing page called .../1234.html or generate an error > page if the use enters a wrong number.

special character regex match

2011-05-05 Thread Agnello George
Hi I got a form with and users and insert in textarea words like : /word_word2/wordword_word.txt /word1_word/wordword_word2.txt /word_word/word2word_word.txt but they should not be able to type the following in the text area / % $ ### space unless ( $files =~ /^\s+$/ || /[\_\/\@\$\#]/)

Re: Open existing HTML page from perl script

2011-05-05 Thread Jeff Pang
2011/5/5 Geospectrum : > Hi, > > I am putting together a simple website and would like visitors to be > able to type a number into a form (say 1234) and a perl script should > run open an existing page called .../1234.html  or generate an error > page if the use enters a wrong number.  I will have

Open existing HTML page from perl script

2011-05-05 Thread Geospectrum
Hi, I am putting together a simple website and would like visitors to be able to type a number into a form (say 1234) and a perl script should run open an existing page called .../1234.html or generate an error page if the use enters a wrong number. I will have already uploaded the page before a

Re: Help regular expression - string paring

2011-05-05 Thread Rob Dixon
On 04/05/2011 13:30, loudking wrote: Hi there, Hereby I have a string parsing problem to ask. The sample strings look like this: : CC02 0565 8E93 D501 0100 6273 .eb : 6800 0500 9093 D501 0100 1400 h... What I am interested is the the

Re: Help regular expression - string paring

2011-05-05 Thread Owen
> Hi there, > > Hereby I have a string parsing problem to ask. The sample strings look > like this: > > : CC02 0565 8E93 D501 0100 6273 .eb > : 6800 0500 9093 D501 0100 1400 h... > > What I am interested is the the 21st and 22nd byte value

Re: Help regular expression - string paring

2011-05-05 Thread Jeff Pang
2011/5/4 loudking : > Hi there, > > Hereby I have a string parsing problem to ask. The sample strings look > like this: > > : CC02 0565 8E93 D501 0100 6273 .eb > : 6800 0500 9093 D501 0100 1400 h... > > What I am interested is the the 21st

Help regular expression - string paring

2011-05-05 Thread loudking
Hi there, Hereby I have a string parsing problem to ask. The sample strings look like this: : CC02 0565 8E93 D501 0100 6273 .eb : 6800 0500 9093 D501 0100 1400 h... What I am interested is the the 21st and 22nd byte value. In the above