Re: print $var =~ s/\s+\).$/)./g;

2008-11-21 Thread Mr. Shawn H. Corey
On Fri, 2008-11-21 at 15:13 -0800, [EMAIL PROTECTED] wrote: > Is there any way I can get rid of that pesky number and just have the > $var string printed? No. Substitution returns the number of substitutions made. Only match will return the matches. -- Just my 0.0002 million dollars worth

Attempting to use SFTP between Windows and Linux box

2008-11-21 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I have a couple of processes that run one on a production box and another on a test box. The production box script checks that a particular file is never more than 40 minutes old while on the test box, this checks that the actual polling processes ( in this case three pollers ) also are

print $var =~ s/\s+\).$/)./g;

2008-11-21 Thread bluecrab22
I would like to print the result of a $var that has been s///'ed. Sure, I can do this: $var =~ s/\s+\).$/)./g; print "$var\n"; but I was thinking more like this: print $var =~ s/\s+\).$/)./g; However, I get a "1" returned (to term), probably b/c one match is found. Is there any way I can get rid

Re: removing files in unix or linux using glob?

2008-11-21 Thread Chas. Owens
On Fri, Nov 21, 2008 at 16:38, Richard Lee <[EMAIL PROTECTED]> wrote: > Richard Lee wrote: >> >> Richard Lee wrote: >>> >>> stion on this.. suppose there is 3 files in temp directory >>> >>> /tmp/yahoo1 >>> /tmp/yahoo2 >>> /tmp/yahoo3 >>> >>> and I wanted to take the last file that was created.. wo

Re: removing files in unix or linux using glob?

2008-11-21 Thread Richard Lee
Richard Lee wrote: Richard Lee wrote: stion on this.. suppose there is 3 files in temp directory /tmp/yahoo1 /tmp/yahoo2 /tmp/yahoo3 and I wanted to take the last file that was created.. would this work? my $filename = shift; my @file_1 = ; my $file_1 = $file_1[-1]; push @files, $file_1; i

Re: removing files in unix or linux using glob?

2008-11-21 Thread Richard Lee
Richard Lee wrote: stion on this.. suppose there is 3 files in temp directory /tmp/yahoo1 /tmp/yahoo2 /tmp/yahoo3 and I wanted to take the last file that was created.. would this work? my $filename = shift; my @file_1 = ; my $file_1 = $file_1[-1]; push @files, $file_1; i am not 100% sure if

Re: removing files in unix or linux using glob?

2008-11-21 Thread Richard Lee
Mr. Shawn H. Corey wrote: See: * perldoc -f unlink * perldoc -f glob * perldoc perlfunc and search for -f under "Alphabetical Listing of Perl Functions" one more question on this.. suppose there is 3 files in temp directory /tmp/yahoo1 /tmp/yahoo2 /tmp/yahoo3 and

Re: Adding Very Large Numbers and Display

2008-11-21 Thread Mr. Shawn H. Corey
On Fri, 2008-11-21 at 11:02 -0800, [EMAIL PROTECTED] wrote: > Hello > > I have a perl script that is working fine. The script involves creating an > array of numbers. The values of these numbers in the is quite large (12 > integer digits or more). I can easily display the numbers with a simple p

Adding Very Large Numbers and Display

2008-11-21 Thread andrewmchorney
Hello I have a perl script that is working fine. The script involves creating an array of numbers. The values of these numbers in the is quite large (12 integer digits or more). I can easily display the numbers with a simple print statement. I want to display the contents with one element per l

RE: need help with SpreadSheet::Parse perl module

2008-11-21 Thread Stewart Anderson
> -Original Message- > From: Chas. Owens [mailto:[EMAIL PROTECTED] > Sent: 21 November 2008 13:13 > To: Manasi Bopardikar > Cc: beginners@perl.org > Subject: Re: need help with SpreadSheet::Parse perl module > > On Fri, Nov 21, 2008 at 07:33, Manasi Bopardikar > <[EMAIL PROTECTED]> wrote

Re: no output Net::SSH2

2008-11-21 Thread Chas. Owens
On Thu, Nov 20, 2008 at 15:09, monnappa appaiah <[EMAIL PROTECTED]> wrote: > Hi, > > As per you suggestion i removed the last line of the code and the > replaced with the code, now the code looks like this > -- >

Re: Perl Call from Java dumps core while making a FTP connection

2008-11-21 Thread Chas. Owens
On Thu, Nov 20, 2008 at 21:43, <[EMAIL PROTECTED]> wrote: > I need help with an issue with executing a perl program from java. I > have a perl script that does a FTP. The perl program works well when I > run it from command line or on a cron job. > > The same command I am also running from a Java

Re: need help with SpreadSheet::Parse perl module

2008-11-21 Thread Chas. Owens
On Fri, Nov 21, 2008 at 07:33, Manasi Bopardikar <[EMAIL PROTECTED]> wrote: snip > in the above code I get the max row count of my sheet by reading it using > the Spreadsheet::ParseExcel::Workbook module of cpan. > > then I want to open the same tablle2sheet.xls for writing.but currently I am > not

Re: help me in rearranging line numbers in a file

2008-11-21 Thread Rob Dixon
Gowri Chandra Sekhar Barla, TLS, Chennai wrote: > > Please help me in rearranging line numbers in a file > > Example" > > File.txt > 1 ghghjghjg > 2 1hjkhkjh > 3 > 4 .macro TTT offset > 5 TTT 200 > 6 TTT 300 > 7 fghfghf > 8 hjhjkhjkh > 9 kgghjgg > > Output should be > > File.txt > 1

need help with SpreadSheet::Parse perl module

2008-11-21 Thread Manasi Bopardikar
Hi, Following is the piece of code my $parser = Spreadsheet::ParseExcel::Workbook->Parse('tablle2sheet.xls');; #parseexcel method that would open the file for writing my $sheet= $parser->Worksheet($Worksheet); my $rw=$sheet->{MaxRow}+1; print "rowcount

Re: help me in rearranging line numbers in a file

2008-11-21 Thread Anirban Adhikary
Is this your homework??? On Fri, Nov 21, 2008 at 5:19 PM, Gowri Chandra Sekhar Barla, TLS, Chennai < [EMAIL PROTECTED]> wrote: > > Hi all > > Please help me in rearranging line numbers in a file > > Example" > > File.txt > 1 ghghjghjg > 2 1hjkhkjh > 3 > 4 .macro TTT offset > 5 TTT 200 >

help me in rearranging line numbers in a file

2008-11-21 Thread Gowri Chandra Sekhar Barla, TLS, Chennai
Hi all Please help me in rearranging line numbers in a file Example" File.txt 1 ghghjghjg 2 1hjkhkjh 3 4 .macro TTT offset 5 TTT 200 6 TTT 300 7 fghfghf 8 hjhjkhjkh 9 kgghjgg Output should be File.txt 1 ghghjghjg 2 1hjkhkjh 3 .macro TTT offset TTT 200 TTT 300 4 fghfghf 5

Re: perl compilation issue - using global variable

2008-11-21 Thread ashish nainwal
I am using perlcc to compile perl script On Thu, Nov 20, 2008 at 8:25 PM, Chas. Owens <[EMAIL PROTECTED]> wrote: > On Thu, Nov 20, 2008 at 00:05, ashish nainwal <[EMAIL PROTECTED]> > wrote: > > Thanks for the info. I will be using my perl script for AIX but I am not > > able to find a supporting

Perl Call from Java dumps core while making a FTP connection

2008-11-21 Thread srini9286
I need help with an issue with executing a perl program from java. I have a perl script that does a FTP. The perl program works well when I run it from command line or on a cron job. The same command I am also running from a Java program, it used to run fine on Solaris 8 and Perl 5.8.0. When we mo