Re: What's wrong with this script?

2006-11-05 Thread John W. Krahn
Tommy Nordgren wrote: > What's wrong with this script for removing the CVS directories from a > checked-out CVS workspace? Are you asking because it is not working correctly? > #!/usr/bin/perl > use strict; > use warnings; > > my $mypath = '/Users/emac/gcc'; > > removecvs( $mypath); > > sub

Re: What's wrong with this script?

2006-11-05 Thread Travis Thornhill
rmdir will only delete empty directories. I assume these directories contain files? Plus I'm not sure that using system() with die works the way you are intending. Why not use perl's rmdir (which also only deletes empty dirs). I'd try opendir on the CVS directory and unlink all the file

Re: What's wrong with this script?

2006-11-05 Thread Tom Phoenix
On 11/5/06, Tommy Nordgren <[EMAIL PROTECTED]> wrote: What's wrong with this script for removing the CVS directories from a checked-out CVS workspace? I don't know. What do you think is wrong with it? Does it do something wrong? Does stepping through it with the debugger give you any clues?

What's wrong with this script?

2006-11-05 Thread Tommy Nordgren
What's wrong with this script for removing the CVS directories from a checked-out CVS workspace? #!/usr/bin/perl use strict; use warnings; my $mypath = '/Users/emac/gcc'; removecvs( $mypath); sub removecvs { my $path = $_[0]; system ('/bin/rmdir',"$path/CVS") or die "Can't

Re: how to print "\n" in the output file

2006-11-05 Thread Mihir Kamdar
thanks all, the different ways suggested by you gave me a lot of learning. regards, Mihir On 11/5/06, Robin Norwood <[EMAIL PROTECTED]> wrote: "Mihir Kamdar" <[EMAIL PROTECTED]> writes: > 1. (*) text/plain > > hi, > > I am a beginner in Perl. I am trying to automatically generate a perl tes

Spreadsheet-WriteExcel and visability

2006-11-05 Thread chen li
Hi all, I download Spreadsheet::WriteExcel,read the document and try some samples. I want to find a method like "Visable" so that I can see the excel file created once the Perl script runs. Now the only thing I can do is to open the created file by myself. I wonder if such method is available. T

Divide Massive Structured data for DVD storage

2006-11-05 Thread reader
Wondering if someone here knows of or has written a perl script that is capable of figuring out how data is organized under top level directories and assigning only whole (top level) directories that will fit for writing to data DVD? Yet splitting the data for spanning DVDs? -- To unsubscribe,

Re: how to print "\n" in the output file

2006-11-05 Thread Robin Norwood
"Mihir Kamdar" <[EMAIL PROTECTED]> writes: > 1. (*) text/plain > > hi, > > I am a beginner in Perl. I am trying to automatically generate a perl test > case file which, on executing, would return HTTP response code and response > time,etc. In the output file that I am getting I want the

Re: how to print "\n" in the output file

2006-11-05 Thread Dr.Ruud
"Dr.Ruud" schreef: > Or set a variable like $LF to '\n'. > > my $LF = q{\n} ; > print $script "print q{${^O}${LF}};\n" ; Oops, make that last line: print $script "print qq{$^O$LF};\n" ; or, if you need the late OS-name: print $script "print qq{\${^O}${LF}};\n" ; -- Affijn, Ruud "

Re: how to print "\n" in the output file

2006-11-05 Thread Dr.Ruud
"Mihir Kamdar" schreef: > print OUTPUTSCRIPT "print qq|\\n|; "; Alternative: print OUTPUTSCRIPT 'print q{\n}; ' ; Why do you print a space at the end of the line? If you need interpolation, use the "" (or qq). print $script "print q{$^O\\n};\n" ; Or set a variable like $LF to '\n'.

Re: how to print "\n" in the output file

2006-11-05 Thread Rob Dixon
Mihir Kamdar wrote: hi, I am a beginner in Perl. I am trying to automatically generate a perl test case file which, on executing, would return HTTP response code and response time,etc. In the output file that I am getting I want the following line: print "\n" ; Any Suggestions?? print 'print