Re: help with making an sftp connection

2023-04-17 Thread Jeremy.l SR
Hi Sorry for my misunderstanding. password_prompt may not be your case. Jeremy.l SR 於 2023年4月18日 週二 上午10:00寫道: > Hi > > What is your password_prompt on your remote sftp server? > ex: > root@192.168.56.100's password: > > according the document, your script will hang at the login phase if the >

Re: help with making an sftp connection

2023-04-17 Thread Jeremy.l SR
Hi What is your password_prompt on your remote sftp server? ex: root@192.168.56.100's password: according the document, your script will hang at the login phase if the wrong prompt is used. Brent Wood via beginners 於 2023年4月18日 週二 上午7:54寫道: > Thanks for that suggestion, it does provide

Re: help with making an sftp connection

2023-04-17 Thread Dermot
Hi, Can you edit the constructor to include `more => [ -v ]` so we can get more feedback from the SSH connection and send the output from that. $sftp = Net::SFTP::Foreign->new($host, user => $user, password => $pass, more => [ qw( -v

Re: help with making an sftp connection

2023-04-16 Thread Jim Gibson via beginners
Perl has a repository of user-submitted modules called Comprehensive Perl Archive Network (CPAN). Net::SFTP::Foreign can be installed from there, and it looks like a good candidate, as does Net::SFTP. The two modules use different methods for invoking the SFTP protocol. I would try one and, if

Re: Help with REST API interaction.

2020-04-24 Thread Gil Magno
Hi Francisco, 2020-04-22 11:21:31 -0300 Francisco Acuña: > Good day, I've been getting familiarized with Perl for the last couple of > days due to a RT integration project I've been handed. I've also been doing > a lot of research and a lot of asking around in forums for pointers on how > to

Re: Help with REST API interaction.

2020-04-24 Thread Gil Magno
Correction: we should use $res->is_success in the 'if' below, not $ua->is_success. 2020-04-24 19:42:32 -0300 Gil Magno: > if ($ua->is_success) { signature.asc Description: PGP signature

Re: Help me with a regex problem

2019-10-26 Thread Dermot
You might consider using Regexp::Common::net. It provides a convenient set of functions for matching IP v4, v6 and mac addresses. https://metacpan.org/pod/Regexp::Common::net On Fri, 25 Oct 2019 at 19:43, John W. Krahn wrote: > On 2019-10-25 3:23 a.m., Maggie Q Roth wrote: > > Hello > >

Re: Help me with a regex problem

2019-10-25 Thread John W. Krahn
On 2019-10-25 3:23 a.m., Maggie Q Roth wrote: Hello Hello. There are two primary types of lines in the log: What are those two types? How do you define them? 60.191.38.xx/ 42.120.161.xx /archives/1005 From my point of view those two lines have two fields, the first

Re: Help me with a regex problem

2019-10-25 Thread Andy Bach
/(?[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s+(?\/.*)/ To avoid the "leaning toothpick" problem, Perl lets use different match delimiters, so the above is the same as: m#(?[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s+(?/.*)# I assume you want to capture the IP and the path, right? if

Re: Help me with a regex problem

2019-10-25 Thread Benjamin S Pendygraft II
That is a backslash followed by a forward slash. The backslash tells the regex parser to treat the next character as a literal character. Useful for matching periods, question marks, brackets, etc. A period matches any character once and an asterisk matches the previous character any number of

Re: Help me with a regex problem

2019-10-25 Thread X Dungeness
my $n = '[0-9]{1,3}'; if ( =~ ( m[ (?:$n\.){3} $n \s+ \S+ ]x ) { # match } On Fri, Oct 25, 2019 at 3:37 AM Maggie Q Roth wrote: > what's V.*? > > Maggie > > On Fri, Oct 25, 2019 at 6:28 PM Илья Рассадин wrote: > >> For example, this regex >> >>

Re: Help me with a regex problem

2019-10-25 Thread Maggie Q Roth
what's V.*? Maggie On Fri, Oct 25, 2019 at 6:28 PM Илья Рассадин wrote: > For example, this regex > > /(?[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s+(?\/.*)/ > > On 25.10.2019 13:23, Maggie Q Roth wrote: > > Hello > > > > There are two primary types of lines in the log: > > > >

Re: Help me with a regex problem

2019-10-25 Thread Илья Рассадин
For example, this regex /(?[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s+(?\/.*)/ On 25.10.2019 13:23, Maggie Q Roth wrote: Hello There are two primary types of lines in the log: 60.191.38.xx        / 42.120.161.xx       /archives/1005 I know how to write regex to match each line, but

Re: Help with Perl 6 script

2019-08-12 Thread Ralph Mellor
the > I have this Perl 6 script from Rosetta, which I wanted to run on Perl 5 > (due to the Active Sate Perl and App version that I have). If ActiveState have packaged https://metacpan.org/pod/Inline::Perl6 then please install and use that. (If they haven't, please ask them to do so.) >

Re: Help with Perl 6 script

2019-08-12 Thread Ralph Mellor
Oops, missed the ending. loop with a parens argument is like a C for with 3 args, init, test, next. The next bit is: ($t, @ABC) »+=« (.01, dABC($t, @ABC, .01)) The » and « opops (or metaops) pack a whole lot of power but can also be used for relatively simple cases like this one in which

Re: Help with Perl 6 script

2019-08-12 Thread Marc Chantreux
hello Rui, > I have this Perl 6 script from Rosetta, which I wanted to run on Perl 5 > (due to the Active Sate Perl and App version that I have). Perl6 and Perl5 are very different. you need to download a perl6 interpretor if you want to run perl6 code. please check https://rakudo.org/.

Re: Help with Perl 6 script

2019-08-12 Thread Andy Bach
Yes, Perl 5 and Perl 6 are quite different in many ways. Some suggested that Perl 6 be looked at as not the next iteration of Perl but a new language that can be made backward compatible with Perl 5 (there are switches etc that let you run P5 code unchanged) but it is not the case of P5 being

Re: Help with Perl 6 script

2019-08-12 Thread William Michels via beginners
Hi Rui, Have you considered just installing Perl 6 ? https://rakudo.org https://www.perl6.org Spoiler alert: the Perl6 code you posted works with no errors on my Perl6 install. Best Regards, Bill. On Thu, Aug 8, 2019 at 1:07 PM Rui Fernandes wrote: > > Greetings > > I have this Perl 6

Re: Help with Perl 6 script

2019-08-12 Thread Bruce Gray
[ Executive Summary: Install Perl 6; it will not disturb your Activestate Perl 5 : https://rakudo.org/files ] > On Aug 8, 2019, at 3:07 PM, Rui Fernandes wrote: > > Greetings Hi Rui! > > I have this Perl 6 script from Rosetta, which I wanted to run on Perl 5 (due > to the Active Sate Perl

Re: Help with "install_driver(Oracle) failed" error message

2019-03-12 Thread Uri Guttman
On 3/12/19 11:59 AM, Frank K. wrote: Greeting, In the infinite wisdom our company, without warning completely uninstalled Active Perl on all of our Windows servers (I believe it was v5.8).. They claimed it was a security risk, but I suspect new licensing fees were the main incentive..

Re: help with another regex

2018-07-17 Thread Lauren C.
I think reading the official tutorial from begin is not that comfortable to a newbie. I bought a book "Learning Perl, 6th Edition" for studying step by step. thanks. On 2018/7/18 星期三 AM 9:08, Uri Guttman wrote: also i always recommend reading the entire perl FAQ as there are many regex tips

Re: help with another regex

2018-07-17 Thread Uri Guttman
On 07/17/2018 08:57 PM, Lauren C. wrote: I did read them, but got no deep impression unless I met the issue. :) not sure what kind of deep impression you need! :) a key thing with docs is rereading them. read them once quickly all the way through to get a sense of the whole picture. read

Re: help with another regex

2018-07-17 Thread Lauren C.
I did read them, but got no deep impression unless I met the issue. :) Uri Guttman 写道: On 07/17/2018 08:46 PM, Lauren C. wrote: Thanks Gil. I think i know the difference of "\w+" and "\w*" now. lauren, did you read the perlretut document? if not, you should. it covers quantifiers early on

Re: help with another regex

2018-07-17 Thread Uri Guttman
On 07/17/2018 08:46 PM, Lauren C. wrote: Thanks Gil. I think i know the difference of "\w+" and "\w*" now. lauren, did you read the perlretut document? if not, you should. it covers quantifiers early on as they are one of the fundamental features of regexes. a key thing to learn is the

Re: help with another regex

2018-07-17 Thread Lauren C.
yeah you explain that well. thanks. Andy Bach 写道: > But it doesn't work for this case: $ perl -le '$x="/path/"; print 1 if $x=~m{path/\w+}' > it expects 1 returned. Well, assuming you mean it shouldn't match as $x starts with a slash and the RE doesn't - you're on the right path.  The

Re: help with another regex

2018-07-17 Thread Lauren C.
Thanks Gil. I think i know the difference of "\w+" and "\w*" now. Gil Magno 写道: 2018-07-17 19:56:59 +0800 Lauren C.: Hello, I want to match: /path/ /path/123 /path/abc but /path/?xxx should not be matched. This works: $ perl -le '$x="/path/abc"; print 1 if $x=~m{path/\w+}' 1 this

Re: help with another regex

2018-07-17 Thread Andy Bach
> But it doesn't work for this case: $ perl -le '$x="/path/"; print 1 if $x=~m{path/\w+}' > it expects 1 returned. Well, assuming you mean it shouldn't match as $x starts with a slash and the RE doesn't - you're on the right path. The reason is, the match goes anywhere, it is "unanchored" so

Re: help with another regex

2018-07-17 Thread Gil Magno
2018-07-17 19:56:59 +0800 Lauren C.: > Hello, > > I want to match: > > /path/ > /path/123 > /path/abc > > but /path/?xxx should not be matched. > > This works: > > $ perl -le '$x="/path/abc"; print 1 if $x=~m{path/\w+}' > 1 > > > this works too: > > $ perl -le '$x="/path/?abc"; print 1 if

Re: help with another regex

2018-07-17 Thread Илья Рассадин
Hi! I think, m{path/(\w+)?/?$} regex can solve your problem. In general, to parse URL, you can use official regex from rfc3986 (see Appendix B for rfc3986) regex is ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? $2 is protocol $4 is host $5 is path $7 is query $9 is fragment.

Re: help with a stat script

2018-07-12 Thread Uri Guttman
On 07/12/2018 11:40 PM, Lauren C. wrote: Hi Uri, I was reading this page: https://www.rexegg.com/regex-lookarounds.html the content of "Mastering Lookahead and Lookbehind" make me confused. (?=foo) (?<=foo) (?!foo) (?i suggest you don't study lookarounds until you are stronger with basic

Re: help with a stat script

2018-07-12 Thread Lauren C.
Hi Uri, I was reading this page: https://www.rexegg.com/regex-lookarounds.html the content of "Mastering Lookahead and Lookbehind" make me confused. (?=foo) (?<=foo) (?!foo) (?but seriously, regexes are a key feature in perl and most modern languages. it is hard to do any text or data

Re: help with a stat script

2018-07-12 Thread Uri Guttman
On 07/12/2018 08:53 PM, Lauren C. wrote: OK I see, thanks Gil. I think the main problem is I don't know much about regex. I will re-learn them this day. heh, relearning regexes will take a lifetime, not just one day! :) but seriously, regexes are a key feature in perl and most modern

Re: help with a stat script

2018-07-12 Thread Lauren C.
Thanks John. Those symbols made me crazy entirely. As what you explained, some are metadata of regex, some are regular characters, it's not clear to me, due to my poor knowledge on regex. Yes I will learn them more. thanks. On 2018/7/13 星期五 AM 2:23, John W. Krahn wrote: On Thu, 2018-07-12

Re: help with a stat script

2018-07-12 Thread Lauren C.
OK I see, thanks Gil. I think the main problem is I don't know much about regex. I will re-learn them this day. On 2018/7/12 星期四 PM 10:02, Gil Magno wrote: 2018-07-12 20:50:22 +0800 Lauren C.: thanks for the kind helps. do you know what the expression in { } stands for? ^(\S+) - - \[(\S+).*\]

Re: help with a stat script

2018-07-12 Thread Lauren C.
Thanks Jim. that explains clearly. On 2018/7/12 星期四 PM 10:00, Jim Gibson wrote: On Jul 12, 2018, at 5:50 AM, Lauren C. wrote: thanks for the kind helps. do you know what the expression in { } stands for? ^(\S+) - - \[(\S+).*\] \"GET (.*?/)\s+ Here is a breakdown: ^ Start

Re: help with a stat script

2018-07-12 Thread John W. Krahn
On Thu, 2018-07-12 at 19:35 +0800, Lauren C. wrote: > > My web is powered by Apache and PHP,its access log seems as blow, > > xx.xx.xx.xx - - [12/Jul/2018:19:29:43 +0800] "GET  > /2018/07/06/antique-internet/ HTTP/1.1" 200 5489 "https://miscnote.ne > t/"  > "Mozilla/5.0 (Macintosh; Intel Mac OS

Re: help with a stat script

2018-07-12 Thread Jim Gibson
> On Jul 12, 2018, at 5:50 AM, Lauren C. wrote: > > thanks for the kind helps. > do you know what the expression in { } stands for? > > ^(\S+) - - \[(\S+).*\] \"GET (.*?/)\s+ Here is a breakdown: ^ Start looking for matches at beginning of string (\S+) Match a consecutive

Re: help with a stat script

2018-07-12 Thread Gil Magno
2018-07-12 20:50:22 +0800 Lauren C.: > thanks for the kind helps. > do you know what the expression in { } stands for? > > ^(\S+) - - \[(\S+).*\] \"GET (.*?/)\s+ Hi, Lauren This is quickly explained in http://perldoc.perl.org/perlrequick.html#Using-character-classes \s (lowercase) stands for

Re: help with a stat script

2018-07-12 Thread Lauren C.
thanks for the kind helps. do you know what the expression in { } stands for? ^(\S+) - - \[(\S+).*\] \"GET (.*?/)\s+ On 2018/7/12 星期四 PM 8:37, Илья Рассадин wrote: "m{ pattern }" is regular expression to parse log string. It's equal to just "/ pattern /". Using different delimiter is

Re: help with a stat script

2018-07-12 Thread Lauren C.
thanks Magno. i will check it. On 2018/7/12 星期四 PM 8:13, Gil Magno wrote: Hi, Lauren The m{...} is a regular expression (regexp). If you not familiar with regexps in Perl, I advise you to read these pages: -http://perldoc.perl.org/perlintro.html#Regular-expressions

Re: help with a stat script

2018-07-12 Thread Gil Magno
2018-07-12 19:35:14 +0800 Lauren C.: > Hello, > > My web is powered by Apache and PHP,its access log seems as blow, > > xx.xx.xx.xx - - [12/Jul/2018:19:29:43 +0800] "GET > /2018/07/06/antique-internet/ HTTP/1.1" 200 5489 "https://miscnote.net/; > "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6)

Re: help with a stat script

2018-07-12 Thread Илья Рассадин
Hi! "m{ pattern }" is regular expression to parse log string. It's equal to just "/ pattern /". Using different delimiter is convenient here because usually symbol "/" must be escaped with backslash "\", but if we use another delimiter - we can left "/" symbol unescaped and reges is more

Re: Help debugging some old Bugzilla perl scripts

2018-02-26 Thread jose cabrera
On Monday, February 26, 2018 at 4:50 AM, Shlomi Fish" wrote... > Hi jose, > > please see http://www.shlomifish.org/Files/files/code/bugzilla.patch for my > patch against bugzilla 3.2 to get it to compile with recent perls. Thanks. josé -- What if eternity is real? Where will you spend it?

Re: Help debugging some old Bugzilla perl scripts

2018-02-26 Thread Shlomi Fish
Hi jose, please see http://www.shlomifish.org/Files/files/code/bugzilla.patch for my patch against bugzilla 3.2 to get it to compile with recent perls. On Mon, 26 Feb 2018 05:43:45 +0100 "jose cabrera" wrote: > On Sunday, February 25, 2018 at 11:26 PM, "Uri Guttman" wrote...

Re: Help debugging some old Bugzilla perl scripts

2018-02-25 Thread Uri Guttman
On 02/25/2018 11:51 PM, jose cabrera wrote: On Sunday, February 25, 2018 at 11:48 PM, "Uri Guttman" wrote... Here is line 1085: foreach my $type qw(dependson blocked) { my @bug_ids = split(/[\s,]+/, $deps_in{$type}); put parens around the qw(). it used to be allowed as the ()

Re: Help debugging some old Bugzilla perl scripts

2018-02-25 Thread jose cabrera
On Sunday, February 25, 2018 at 11:48 PM, "Uri Guttman" wrote... > >>> Here is line 1085: > >>> foreach my $type qw(dependson blocked) { > >>> my @bug_ids = split(/[\s,]+/, $deps_in{$type}); > >> put parens around the qw(). it used to be allowed as the () in the for > >> loop but

Re: Help debugging some old Bugzilla perl scripts

2018-02-25 Thread Uri Guttman
On 02/25/2018 11:43 PM, jose cabrera wrote: On Sunday, February 25, 2018 at 11:26 PM, "Uri Guttman" wrote... syntax error at Bugzilla/Bug.pm line 1085, near "$type qw(dependson blocked)" Here is line 1085: foreach my $type qw(dependson blocked) {

Re: Help debugging some old Bugzilla perl scripts

2018-02-25 Thread jose cabrera
On Sunday, February 25, 2018 at 11:26 PM, "Uri Guttman" wrote... > > > > > > syntax error at Bugzilla/Bug.pm line 1085, near "$type qw(dependson > > blocked)" > > > > Here is line 1085: > > foreach my $type qw(dependson blocked) { > > my

Re: Help debugging some old Bugzilla perl scripts

2018-02-25 Thread Uri Guttman
On 02/25/2018 10:47 PM, jose cabrera wrote: Greetings! Long story, I had to install Bugzilla v3.2, which was in a WinNT 4. I have now installed Bugzilla v3.2, in the Ubuntu 14.04 server, but I have perl (v5.22.1) and I am getting lots of errors. Once I learn to fix one of these, I can work

Re: help check a piece of code

2017-04-10 Thread Andy Bach
On Sat, Apr 1, 2017 at 4:24 AM, K. Peng wrote: > I don't know why the "ref" and "scalar" functions here can be used to > validate if it's ASCII or UTF8 encoding. > > > use constant ASCII => ref eval { > require Encode; > Encode::find_encoding('ascii'); > }; > >

Re: help with Hash of arrays of arrays

2015-07-02 Thread Nathalie Conte
HI Shlomi, Thanks for your comments about best practise which I have implemented, Any ideas on why my hash of arrays of arrays is misbehaving? Thanks Nat On 1 Jul 2015, at 15:42, Shlomi Fish shlo...@shlomifish.org wrote: Hi Nat, some comments about your code. On Wed, 1 Jul 2015 13:00:53

Re: help with Hash of arrays of arrays

2015-07-02 Thread Илья Рассадин
Hi Nathalie. Please, next time create gist with updated code, and send link to it. Now your code is messy and its really hard to tell anything about it. One more comment - you mix variable with computerish names and with names from subject area. It's bad, you must always name your variables

Re: help with Hash of arrays of arrays

2015-07-01 Thread Shlomi Fish
Hi Nat, some comments about your code. On Wed, 1 Jul 2015 13:00:53 +0100 nco...@ebi.ac.uk wrote: Hi, I need some help with a hash of array of array. this is my input data structure: gene aal1 data1 data2 data9 gene bal2 data3 data4 data10 gene bal3

Re: Help with a RE

2014-01-09 Thread Gary Stainburn
On Thursday 09 January 2014 02:01:55 timothy adigun wrote: Hi, On Thu, Jan 9, 2014 at 11:57 AM, Peter Gordon pete...@netspace.net.auwrote: I'm trying do write a one line RE to strip sequence numbers off filenames. Something like this? s/^[0-9_-]+//; Shouldn't that be

Re: Help with a RE

2014-01-09 Thread Gary Stainburn
On Thursday 09 January 2014 09:53:35 Gary Stainburn wrote: On Thursday 09 January 2014 02:01:55 timothy adigun wrote: Hi, On Thu, Jan 9, 2014 at 11:57 AM, Peter Gordon pete...@netspace.net.auwrote: I'm trying do write a one line RE to strip sequence numbers off filenames.

Re: Help with a RE

2014-01-09 Thread timothy adigun
Hi, On Thu, Jan 9, 2014 at 10:55 AM, Gary Stainburn gary.stainb...@ringways.co.uk wrote: On Thursday 09 January 2014 09:53:35 Gary Stainburn wrote: On Thursday 09 January 2014 02:01:55 timothy adigun wrote: Hi, On Thu, Jan 9, 2014 at 11:57 AM, Peter Gordon

Re: Help with a RE

2014-01-09 Thread Peter Gordon
On Thu, 9 Jan 2014 09:55:45 +, Gary Stainburn wrote: On Thursday 09 January 2014 09:53:35 Gary Stainburn wrote: Oops, Missed a bit, try s/^[0-9]+[a-c]{0,1}[-_]//; Ringways Garages http://www.ringways.co.uk Yes, this works is probably more efficient than my RE. Thanks -- Peter Gordon,

Re: Help with a RE

2014-01-09 Thread Rob Dixon
On 09/01/2014 09:55, Gary Stainburn wrote: On Thursday 09 January 2014 09:53:35 Gary Stainburn wrote: Oops, Missed a bit, try s/^[0-9]+[a-c]{0,1}[-_]//; /[a-c]{0,1}/ is normally written as /[a-c]?/ --- This email is free from viruses and malware because avast! Antivirus protection is

Re: Help with a RE

2014-01-08 Thread timothy adigun
Hi, On Thu, Jan 9, 2014 at 11:57 AM, Peter Gordon pete...@netspace.net.auwrote: I'm trying do write a one line RE to strip sequence numbers off filenames. Something like this? s/^[0-9_-]+//; The filename can may have: No sequence numbers or Start with a variable number of

Re: Help with a RE

2014-01-08 Thread Peter Gordon
On Thu, 9 Jan 2014 10:57:00 GMT, Peter Gordon wrote: I'm trying do write a one line RE to strip sequence numbers off filenames.  The filename can may have: No sequence numbers or Start with a variable number of digits, Followed by an optional character between a and c Followed by a compulsory - or

Re: help on file search

2013-11-10 Thread Shawn Wilson
File::Find also see find2perl Rahim Fakir rahim.g.fa...@gmail.com wrote: Iam looking for a module or a script that when running the script.pl, I have to write the name of a file and it searches in my C: drive. Best regards Ray -- *Nome: Rahim Gulamo Nabi Mussa Fakir* *Morada:Rua

Re: help on file search

2013-11-10 Thread Shlomi Fish
Hi all, On Sun, 10 Nov 2013 19:14:22 -0500 Shawn Wilson ag4ve...@gmail.com wrote: File::Find also see find2perl File::Find is OK for that and is a core module, but it has some severe philosophical design limitations, and has a user-hostile interface. Here are some alternatives:

Re: Help needed with here documents (security?)

2013-10-24 Thread Janek Schleicher
Another way of handling is to use one of the availabe Email::* modules on CPAN. This would have the advantages of (beside you don't have to worry about details of string quoting): - better code, as you write down what you intend to do instead of how you do it - better security, as those

Re: Help needed with here documents (security?)

2013-10-24 Thread Shawn H Corey
On Thu, 24 Oct 2013 13:52:51 +0200 Janek Schleicher janek_schleic...@yahoo.de wrote: use Email::Simple; my $email = Email::Simple-create( header = [ From = $sender_addr, To = 'ad...@tristatelogic.com', X-Server-Protocol = $server_protocol,

Re: Help needed with here documents (security?)

2013-10-24 Thread Jim Gibson
On Oct 24, 2013, at 6:07 AM, Shawn H Corey wrote: On Thu, 24 Oct 2013 13:52:51 +0200 Janek Schleicher janek_schleic...@yahoo.de wrote: use Email::Simple; my $email = Email::Simple-create( header = [ From = $sender_addr, To =

Re: Help needed with here documents (security?)

2013-10-24 Thread Shawn H Corey
On Thu, 24 Oct 2013 06:30:58 -0700 Jim Gibson jimsgib...@gmail.com wrote: On Oct 24, 2013, at 6:07 AM, Shawn H Corey wrote: On Thu, 24 Oct 2013 13:52:51 +0200 Janek Schleicher janek_schleic...@yahoo.de wrote: use Email::Simple; my $email = Email::Simple-create( header = [

Re: Help needed with here documents (security?)

2013-10-24 Thread Janek Schleicher
Am 24.10.2013 15:07, schrieb Shawn H Corey: my $email = Email::Simple-create( header = [ From = $sender_addr, To = 'ad...@tristatelogic.com', X-Server-Protocol = $server_protocol, X-Http-User-Agent = $http_user_agent,

Re: Help needed with here documents (security?)

2013-10-24 Thread Octavian Rasnita
From: Janek Schleicher janek_schleic...@yahoo.de Am 24.10.2013 15:07, schrieb Shawn H Corey: my $email = Email::Simple-create( header = [ From = $sender_addr, To = 'ad...@tristatelogic.com', X-Server-Protocol = $server_protocol,

Re: Help needed with here documents (security?)

2013-10-24 Thread Ronald F. Guilmette
In message 7E7181F2497441C88988DD1F16E4A743@octavianf303f0, you wrote: From: Janek Schleicher janek_schleic...@yahoo.de Am 24.10.2013 15:07, schrieb Shawn H Corey: my $email = Email::Simple-create( header = [ From = $sender_addr, To =

Re: Help needed with here documents (security?)

2013-10-24 Thread Jim Gibson
On Oct 24, 2013, at 11:59 AM, Ronald F. Guilmette wrote: But, getting back to my original 2 questions... I want to stress that I did not ask how to formulate and/or send a properly formatted e-mail message. I can handle that part, even if perhaps only in my own clumsey way. What is of

Re: Help needed with here documents (security?)

2013-10-24 Thread John W. Krahn
Ronald F. Guilmette wrote: In message5268663c.4040...@stemsystems.com, Uri Guttmanu...@stemsystems.comwrote: i think a blank line with . will end input to smtp servers. try that too in the line after the from field. DING DING DING!!! Give that man a cupie doll, because he's the winner of

Re: Help needed with here documents (security?)

2013-10-24 Thread Shawn H Corey
On Thu, 24 Oct 2013 14:55:51 -0700 John W. Krahn jwkr...@shaw.ca wrote: stdin (and stdout) are part of a stream protocol and as such are not about files and do not signal End-Of-File which is part of why emails use the single period to signal the end of the message. I thought that was from

Re: Help needed with here documents (security?)

2013-10-24 Thread Ronald F. Guilmette
In message 52699767.2050...@shaw.ca, you wrote: Ronald F. Guilmette wrote: In message5268663c.4040...@stemsystems.com, Uri Guttmanu...@stemsystems.comwrote: i think a blank line with . will end input to smtp servers. try that too in the line after the from field. DING DING DING!!! Give

Re: Help needed with here documents (security?)

2013-10-24 Thread Ronald F. Guilmette
In message 20131024183255.3c233104@sage, you wrote: On Thu, 24 Oct 2013 14:55:51 -0700 John W. Krahn jwkr...@shaw.ca wrote: stdin (and stdout) are part of a stream protocol and as such are not about files and do not signal End-Of-File which is part of why emails use the single period to

Re: Help needed with here documents (security?)

2013-10-24 Thread Octavian Rasnita
From: Ronald F. Guilmette r...@tristatelogic.com In message 7E7181F2497441C88988DD1F16E4A743@octavianf303f0, you wrote: From: Janek Schleicher janek_schleic...@yahoo.de Am 24.10.2013 15:07, schrieb Shawn H Corey: my $email = Email::Simple-create( header = [ From

Re: Help needed with here documents (security?)

2013-10-23 Thread Ronald F. Guilmette
In message 39517.1382566...@server1.tristatelogic.com, I wrote: About a day ago, some schmuck set about to try, hard, to exploit the personally written Perl code I have in place and that processes the input for the contact form on my web site... I neglected to mention that this was obviously

Re: Help needed with here documents (security?)

2013-10-23 Thread Uri Guttman
On 10/23/2013 06:18 PM, Ronald F. Guilmette wrote: ... print SM EOF; To: Tristatelogic.Com Administrator admin\@tristatelogic.com From: $sender_name $sender_addr Subject: Your message to Tristatelogic.Com X-Server-Protocol: $server_protocol X-Http-User-Agent: $http_user_agent X-Http-Referer:

Re: Help needed with here documents (security?)

2013-10-23 Thread Ronald F. Guilmette
In message 52684f18.2000...@stemsystems.com, you wrote: On 10/23/2013 06:18 PM, Ronald F. Guilmette wrote: ... print SM EOF; To: Tristatelogic.Com Administrator admin\@tristatelogic.com From: $sender_name $sender_addr Subject: Your message to Tristatelogic.Com X-Server-Protocol:

Re: Help needed with here documents (security?)

2013-10-23 Thread Shawn H Corey
On Wed, 23 Oct 2013 16:12:12 -0700 Ronald F. Guilmette r...@tristatelogic.com wrote: I believe that you may be on to something here, but it is more than just Postfix seeing a \n\n and believeing that it had encountered the end of the headers. It is possible that something in the input stream

Re: Help needed with here documents (security?)

2013-10-23 Thread Dr.Ruud
On 2013-10-24 01:12, Ronald F. Guilmette wrote: In message 52684f18.2000...@stemsystems.com, you wrote: On 10/23/2013 06:18 PM, Ronald F. Guilmette wrote: ... print SM EOF; To: Tristatelogic.Com Administrator admin\@tristatelogic.com From: $sender_name $sender_addr Subject: Your message to

Re: Help needed with here documents (security?)

2013-10-23 Thread Uri Guttman
On 10/23/2013 07:12 PM, Ronald F. Guilmette wrote: In message 52684f18.2000...@stemsystems.com, you wrote: I _do_ know more than a little about mail servers, and while you are basically correct, i.e. that Postfix would certainly view anything past the first \n\n encountered as being

Re: Help needed with here documents (security?)

2013-10-23 Thread Ronald F. Guilmette
In message 20131023193228.38cf83e2@sage, you wrote: On Wed, 23 Oct 2013 16:12:12 -0700 Ronald F. Guilmette r...@tristatelogic.com wrote: I believe that you may be on to something here, but it is more than just Postfix seeing a \n\n and believeing that it had encountered the end of the

Re: Help needed with here documents (security?)

2013-10-23 Thread Ronald F. Guilmette
In message 5268663c.4040...@stemsystems.com, Uri Guttman u...@stemsystems.comwrote: i think a blank line with . will end input to smtp servers. try that too in the line after the from field. DING DING DING!!! Give that man a cupie doll, because he's the winner of today's perplexing puzzle

Re: Help needed with here documents (security?)

2013-10-23 Thread Ronald F. Guilmette
In message 40504.1382576...@server1.tristatelogic.com, I wrote: Well, I added to the script some rudimentary filtering/validation of the input strings in question also. you need more than rudimentary filtering. make sure the from field is one string, no newlines or anything but printable

Re: Help on exception handling (Try::Tiny)

2013-10-04 Thread Jim Gibson
On Oct 4, 2013, at 3:36 AM, Shaji Kalidasan wrote: Dear Perlers, I am trying to figure out the flow of a try catch block after executing the 'next' statement. In the try statement after illegal division by zero the program flow reaches catch block and then executes the 'next' statement.

Re: Help on exception handling (Try::Tiny)

2013-10-04 Thread Shaji Kalidasan
. --- From: Andy Bach afb...@gmail.com To: Shaji Kalidasan shajiin...@yahoo.com Sent: Friday, 4 October 2013 10:23 PM Subject: Re: Help on exception handling (Try::Tiny) On Fri, Oct 4

Re: help for an array refence within an hash pattern

2013-09-23 Thread Jing Yu
Hi Luca, Doesn't it autovivify $hash_ref-{$key} when you push $new_value to it? At least when I tested the following code, it worked. push @{ $hash_ref-{$key} }, $new_value; Regards, Jing On 23 Sep 2013, at 20:12, Luca Ferrari fluca1...@infinito.it wrote: Hi, in my applications often I end

Re: help for an array refence within an hash pattern

2013-09-23 Thread Luca Ferrari
On Mon, Sep 23, 2013 at 2:32 PM, Jing Yu logus...@googlemail.com wrote: Hi Luca, Doesn't it autovivify $hash_ref-{$key} when you push $new_value to it? At least when I tested the following code, it worked. push @{ $hash_ref-{$key} }, $new_value; Correct! How did I not come to this?

Re: Help with regex conversions

2013-09-19 Thread Dr.Ruud
On 19/09/2013 20:09, rajesh kumar wrote: Hi, I am reading a set of regex, separated by comma, from database, which is in string format and using eval to convert them in the array. For e.g., String from database is'qr/^abc .* $/,qr/xxx/' $string = 'qr/^abc .*$/,qr/xxx/'; # this $string comes

Re: Help with regex conversions

2013-09-19 Thread Shlomi Fish
Hi Rajesh, On Thu, 19 Sep 2013 23:39:48 +0530 rajesh kumar rajeshkr...@gmail.com wrote: Hi, I am reading a set of regex, separated by comma, from database, which is in string format and using eval to convert them in the array. For e.g., String from database is 'qr/^abc .* $/,qr/xxx/'

Re: Help on saving and retrieving data structures

2013-09-14 Thread *Shaji Kalidasan*
September 2013 6:01 PM Subject: Re: Help on saving and retrieving data structures On Fri, 13 Sep 2013 19:10:58 +0800 (SGT) *Shaji Kalidasan* shajiin...@yahoo.com wrote: I am saving the data structure to a file and retrieving it back again, but, when I 'use strict' it is giving the following

Re: Help on saving and retrieving data structures

2013-09-14 Thread Shlomi Fish
Hi Shaji, On Sat, 14 Sep 2013 16:19:26 +0800 (SGT) *Shaji Kalidasan* shajiin...@yahoo.com wrote: Dear David, Thanks for throwing light on the topic by citing the security implications of executing eval and also suggesting the industry standard 'JSON' for interoperability.  One should

Re: Help on saving and retrieving data structures

2013-09-14 Thread Dermot
++Storable On 14 September 2013 09:39, Shlomi Fish shlo...@shlomifish.org wrote: Hi Shaji, On Sat, 14 Sep 2013 16:19:26 +0800 (SGT) *Shaji Kalidasan* shajiin...@yahoo.com wrote: Dear David, Thanks for throwing light on the topic by citing the security implications of executing

Re: Help on saving and retrieving data structures

2013-09-14 Thread Jimi Wills
Yes, I agree. Top answer! Can also consider YAML if you wanted to do a lot of manual editing of data, but probably JSON is best. Dr Jimi C Wills David Precious wrote in message news:20130913133147.0b88fbeb@columbia... On Fri, 13 Sep 2013 19:10:58 +0800 (SGT) *Shaji Kalidasan*

Re: Help on saving and retrieving data structures

2013-09-13 Thread 'lesleyb'
On Fri, Sep 13, 2013 at 07:10:58PM +0800, *Shaji Kalidasan* wrote: Dear Perlers, I am saving the data structure to a file and retrieving it back again, but, when I 'use strict' it is giving the following error message Global symbol %game requires explicit package name This message means

Re: Help on saving and retrieving data structures

2013-09-13 Thread *Shaji Kalidasan*
. --- From: 'lesleyb' lesl...@herlug.org.uk To: beginners@perl.org Sent: Friday, 13 September 2013 5:26 PM Subject: Re: Help on saving and retrieving data structures On Fri, Sep 13, 2013 at 07:10:58PM +0800, *Shaji

Re: Help on saving and retrieving data structures

2013-09-13 Thread *Shaji Kalidasan*
. --- From: Dr Jimi-Carlo Bukowski-Wills jbwi...@staffmail.ed.ac.uk To: *Shaji Kalidasan* shajiin...@yahoo.com Sent: Friday, 13 September 2013 5:12 PM Subject: Re: Help on saving and retrieving data structures Hi   It’s

Re: Help on saving and retrieving data structures

2013-09-13 Thread David Precious
On Fri, 13 Sep 2013 19:10:58 +0800 (SGT) *Shaji Kalidasan* shajiin...@yahoo.com wrote: I am saving the data structure to a file and retrieving it back again, but, when I 'use strict' it is giving the following error message Global symbol %game requires explicit package name Others have

Re: Help on saving and retrieving data structures

2013-09-13 Thread 'lesleyb'
On Fri, Sep 13, 2013 at 01:31:47PM +0100, David Precious wrote: On Fri, 13 Sep 2013 19:10:58 +0800 (SGT) *Shaji Kalidasan* shajiin...@yahoo.com wrote: I am saving the data structure to a file and retrieving it back again, but, when I 'use strict' it is giving the following error message

Re: Help on regex

2013-08-15 Thread timothy adigun
with it is your gift back to God. --- -- *From:* Lawrence Statton lawre...@cluon.com *To:* beginners@perl.org *Sent:* Wednesday, 14 August 2013 10:17 PM *Subject:* Re: Help on regex On 08/14

  1   2   3   4   5   6   7   8   9   10   >