Re: search and replace

2016-06-29 Thread Danny Wong
ers@perl.org>> Subject: Re: search and replace Op 29-06-16 om 06:35 schreef Danny Wong: Hi Perl GURUs, I have a json file that needs parsing. Here is a typical string I’m searching for. I want to delete everything but the last 2 character “],”. ], [ "a

search and replace

2016-06-28 Thread Danny Wong
Hi Perl GURUs, I have a json file that needs parsing. Here is a typical string I’m searching for. I want to delete everything but the last 2 character “],”. ], [ "ansible", "2.1.0.0-1ppa~trusty", false ], Here is what I tried: I slu

Re: split regex

2015-03-19 Thread Danny Wong (dannwong)
Nevermind. I used regex to accomplish what I wanted instead of the split command. Thanks guys! From: Danny H Wong mailto:dannw...@cisco.com>> Date: Thursday, March 19, 2015 at 2:25 PM To: Perl List mailto:beginners@perl.org>>, Perl Beginners mailto:beginners@perl.org>> Subject: split regex Hi P

split regex

2015-03-19 Thread Danny Wong (dannwong)
Hi Perl GURU, I have a string like this: 'Baseline: (_bMgvUBQ_EeKsP6DECdq0Lg) 1 "Initial Baseline" "Initial Baseline of Component NGP-Diagnostics" Sivakumar Subas Oct 12, 2012 12:35:41 AM'; I’m trying to perform a split via \s (spaces) delimiter, but this give me a partial return of "Initial Ba

Read email

2014-08-21 Thread Danny Wong (dannwong)
Hi Perl Gurus, What is the best module to use to read incoming emails from a particular user? Any examples would be great to! Thanks! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Please check my logic

2014-07-21 Thread Danny Wong (dannwong)
Sheman, Do it the perl way, hash it. 1. Read both files 2. Put the lines into the key of a hash. * While (reading files) * $hash{$_}++; Now you can print/process your hash key. There’s shouldn’t be duplicates. From: Sherman Willden mailto:sherman.will...@gmail.com>> Date: Mo

Re: regular expression

2014-05-06 Thread Danny Wong (dannwong)
eses gives me this output. $1 is Danny Wong (danwong yes the last ) is missing, so it looks like I’m close, I’m not exactly sure what is missing. On 5/6/14, 10:25 PM, "John SJ Anderson" wrote: >On Tue, May 6, 2014 at 10:19 PM, Danny Wong (dannwong) > wrote: > >> What

regular expression

2014-05-06 Thread Danny Wong (dannwong)
Hi Guys, I have the following strings. my $str1="^Modifications made by Danny Wong (danwong) on 2014/05/06 18:27:48 from database brms"; #$str1="^Modifications made by danwong on 2014/05/06 18:27:48 from database brms²; What is a regular expression where I can extract

downloading file from website

2013-07-12 Thread Danny Wong (dannwong)
> >HI Perl GURU's, Is there a way to download a zip file from a web page and have the script simulate pushing the "accept" button on the webpage? This is required before you can download a zip or any file. Any ideas? Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For a

overriding a custom compiled perl binary

2011-11-15 Thread Danny Wong (dannwong)
Hi all, I received a custom compiled perl binary version, years ago. The path location of the perl binary and lib paths are hardcoded. Is there a way for me to override this path setting, so the custom perl binaries are not looking at that specific directory or needs to be in the specifi

timing out threads

2011-11-01 Thread Danny Wong (dannwong)
Hi all, I would like to perform the following, start X (say 10) number of threads to perform some operation (ex. Copy command), I would like to exit or return out of the thread(s) that takes too long ( ex. 30 minutes ). I'm thinking I should spawn an independent thread (a watch thread) and

perl version 5.12

2011-08-22 Thread Danny Wong (dannwong)
Hi All, I'm moving from perl version 5.8 to 5.12. In 5.8 code, I use the dbmopen function to read a perl db, but that function doesn't seem to work with version 5.12. any ideas if the function name changed or I need to use something else? Thanks. -- To unsubscribe, e-mail: beginners-unsubs