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

Re: ? getting appended to file name while writing o file

2015-03-19 Thread Satya Prasad Nemana
Bill, Carl, Andrew, Thanks a lot for your answers. yes, i will make the change to use the perl utilities as it will make the code platform independent. Regards, Satya On 19 March 2015 at 16:58, Carl Inglis wrote: > It's not actually ending up with a ? character at the end - it's ending up >

Re: ? getting appended to file name while writing o file

2015-03-19 Thread Carl Inglis
It's not actually ending up with a ? character at the end - it's ending up with a new line character. Your terminal is (as Andrew implied) displaying a ? character for a character code outside the range of characters it knows it can display. Regards, Carl On 19 March 2015 at 11:19, Andrew Solomo

Re: ? getting appended to file name while writing o file

2015-03-19 Thread Andrew Solomon
No - that one's a mystery to me:) I suspect it's something to do with the terminal and character encoding http://stackoverflow.com/questions/5306153/how-to-get-terminals-character-encoding Andrew On Thu, Mar 19, 2015 at 7:41 AM, Satya Prasad Nemana wrote: > Great Andrew. > it is all good now.

Re: ? getting appended to file name while writing o file

2015-03-19 Thread Satya Prasad Nemana
Great Andrew. it is all good now. Could you please tell how new line ended up as ? in the file name Thanks, Satya On 19 March 2015 at 12:53, Andrew Solomon wrote: > my $logFileName="log_ping_".`date +"%d_%b_%y_%H_%M_%S"`; > > should be followed by > > chomp($logFileName) > > otherwise there's

Re: ? getting appended to file name while writing o file

2015-03-19 Thread Andrew Solomon
my $logFileName="log_ping_".`date +"%d_%b_%y_%H_%M_%S"`; should be followed by chomp($logFileName) otherwise there's a trailing newline character in $logFileName on account of the call to date Andrew On Thu, Mar 19, 2015 at 6:08 AM, Satya Prasad Nemana wrote: > Hi > > I have a small program