Configuring Apache on Fedora9 for codestriker.

2009-03-05 Thread anand.bhatta
Hello, I am not able to configure codestriker. My configuration is Fedora 9, Apache 2.2. If I give the complete path of codestriker.pl (/codestriker/codestriker-1.9.8/cgi-bin/codestriker.pl) in the browser then I get the error window that the codestriker.js was not found and I need to check

Re: Configuring Apache on Fedora9 for codestriker.

2009-03-05 Thread Greg Jetter
On Thursday 05 March 2009 4:36:19 am anand.bha...@wipro.com wrote: Hello, I am not able to configure codestriker. My configuration is Fedora 9, Apache 2.2. If I give the complete path of codestriker.pl (/codestriker/codestriker-1.9.8/cgi-bin/codestriker.pl) in the browser then I get the

Page Breaks

2009-03-05 Thread Bill Stephenson
Does anyone know where I can learn how to make smooth page breaks in dynamically created HTML documents. Most of the document is contained in a table and the number of rows is a variable as well as the number of lines of text in each row. I'd like to be able to know when a document has

Re: Page Breaks

2009-03-05 Thread Shaun Fryer
This shouldn't be that difficult if you know how many lines/rows you want on each page. How are you generating the HTML? Are you doing it via CGI.pm, Template::Toolkit, HTML::Template, something else? That will be the defining factor as to how you'd go about it. -- Shaun Fryer http://sourcery.ca/

Re: Page Breaks

2009-03-05 Thread Shaun Fryer
Without providing actual code, the approach I'd recommend is to accumulate in a data structure something such as the following. my $tables = [ [ # table/page 0 [ # row 0 q| line 0 of row 0 |, # this just represents a line of user-input, presumably as obtained from Text::Wrap

Re: Page Breaks

2009-03-05 Thread Greg Jetter
On Thursday 05 March 2009 10:25:44 am Bill Stephenson wrote: Does anyone know where I can learn how to make smooth page breaks in dynamically created HTML documents. Most of the document is contained in a table and the number of rows is a variable as well as the number of lines of text in

How to release memory?

2009-03-05 Thread yyq
Hello, Everybody, I have code as below. What the code does is receive a connection and get a file from it, It works ok, but the problem is every time it receives some files, the memory it occupied augment, and accumulates every time till it killed by system. I am beginer of perl, I can't explain

Re: Printing directory sizes

2009-03-05 Thread Dermot
2009/3/4 Lauri Nikkinen lauri.nikki...@iki.fi: Ok, thanks, I wrote this based on your suggestions, and it seems to do what I want. One further question, if you don't mind, how to format this so that it prints sizes in megabytes, not in bits? I tend to use this for kilobytes sprintf(%.2f Kb,

Re: How to release memory?

2009-03-05 Thread Deviloper
Do you ever join your threads? Which Perl-Version do you use? Try update to the latest. Threads had memoryleaks and might till have some. Bye, B.

Copy file recursively

2009-03-05 Thread Rock Lifestyle
Hi ,   My directory structure is like   ls -R temp temp: 2.1  2.2  cleanup  setup   temp/2.1: 2.1.1    cleanup  setup   temp/2.1/2.1.1:   setup cleanup 2.1.1.01  2.1.1.02  2.1.1.03  2.1.1.04  2.1.1.05  2.1.1.06  2.1.1.07  2.1.1.08   temp/2.1/2.1.1/2.1.1.01: cleanup  setup    test  

Re: Strange problem with substr() function and right aligned fields

2009-03-05 Thread Jenda Krynicky
From: Bill Harpley bill.harp...@ericsson.com I must process the output of an SQL query using Perl. I know the column position of the data in the output file, which means that I am able to calculate the width of each field. All of the data in the file is left-aligned to the field, except

Strange problem with substr() function and right aligned fields

2009-03-05 Thread Bill Harpley
Jenda, Thanks for questioning my method of approach: I must process the output of an SQL query using Perl. I know the column position of the data in the output file, which means that I am able to calculate the width of each field. All of the data in the file is left-aligned to the

Copy file recursively

2009-03-05 Thread Rock Lifestyle
--- On Thu, 5/3/09, Rock Lifestyle lifestyle.r...@yahoo.in wrote: From: Rock Lifestyle lifestyle.r...@yahoo.in Subject: Copy file recursively To: beginners@perl.org Date: Thursday, 5 March, 2009, 9:48 AM Hi ,   My directory structure is like   ls -R temp temp: 2.1  2.2  cleanup 

Re: Strange problem with substr() function and right aligned fields

2009-03-05 Thread Jenda Krynicky
From: Bill Harpley bill.harp...@ericsson.com My Comment: this is an obvious approach, with numerous advantages. However, it requires installation of the BD:Oracle module, which can be very tricky. Basically, I started to install and configure all of this (Perl, DBI,DB:Oracle) on HP-UX 11.31

Copy file recursively

2009-03-05 Thread Swayam
Hi , My directory structure is like ls -R temp temp: 2.1 2.2 cleanup setup temp/2.1: 2.1.1cleanup setup temp/2.1/2.1.1: setup cleanup 2.1.1.01 2.1.1.02 2.1.1.03 2.1.1.04 2.1.1.05 2.1.1.06 2.1.1.07 2.1.1.08 temp/2.1/2.1.1/2.1.1.01: cleanup setuptest

Copy file recursively

2009-03-05 Thread Swayam
Hi , My directory structure is like ls -R temp temp: 2.1 2.2 cleanup setup temp/2.1: 2.1.1cleanup setup temp/2.1/2.1.1: setup cleanup 2.1.1.01 2.1.1.02 2.1.1.03 2.1.1.04 2.1.1.05 2.1.1.06 2.1.1.07 2.1.1.08 temp/2.1/2.1.1/2.1.1.01: cleanup setuptest

Re: Printing directory sizes

2009-03-05 Thread Lauri Nikkinen
Thanks. I modified the script again based on your suggestions. E.g. from this script I get The total size of the file in etc is 15712.35 Kb The total size of the file in etc is 15.34 Mb and when I check this from Win XP Explorer (folder properties) window I get Size: 372 KB (380 928 bytes)

Re: Copy file recursively

2009-03-05 Thread Swayam
On Thu, Mar 5, 2009 at 6:06 PM, Swayam swaya...@gmail.com wrote: Hi , My directory structure is like ls -R temp temp: 2.1 2.2 cleanup setup temp/2.1: 2.1.1cleanup setup temp/2.1/2.1.1: setup cleanup 2.1.1.01 2.1.1.02 2.1.1.03 2.1.1.04 2.1.1.05 2.1.1.06

Re: Printing directory sizes

2009-03-05 Thread Gunnar Hjalmarsson
Lauri Nikkinen wrote: ... from this script I get The total size of the file in etc is 15712.35 Kb The total size of the file in etc is 15.34 Mb and when I check this from Win XP Explorer (folder properties) window I get Size: 372 KB (380 928 bytes) What is the reason for this difference?

hashes + use constant - weird behavior

2009-03-05 Thread Stanisław T. Findeisen
#!/usr/bin/perl use warnings; use strict; use constant { SOME_CONSTANT = 'some value' }; my $index = 'some value'; my %hash = (); $hash{SOME_CONSTANT} = 'value 1'; $hash{$index} = 'value 2'; print(The value is: . $hash{SOME_CONSTANT} . '/' . $hash{$index} . \n); print(Comparison 1: .

Re: hashes + use constant - weird behavior

2009-03-05 Thread Chas. Owens
On Thu, Mar 5, 2009 at 12:23, Stanisław T. Findeisen sf181...@students.mimuw.edu.pl wrote: #!/usr/bin/perl use warnings; use strict; use constant {    SOME_CONSTANT = 'some value' }; snip print(The value is: . $hash{SOME_CONSTANT} . '/' . $hash{$index} . \n); snip SOME_CONSTANT is

Re: hashes + use constant - weird behavior

2009-03-05 Thread Gunnar Hjalmarsson
Stanisław T. Findeisen wrote: #!/usr/bin/perl use warnings; use strict; use constant { SOME_CONSTANT = 'some value' }; my $index = 'some value'; my %hash = (); $hash{SOME_CONSTANT} = 'value 1'; $hash{$index} = 'value 2'; print(The value is: . $hash{SOME_CONSTANT} . '/' . $hash{$index}

Re: Copy file recursively

2009-03-05 Thread Jim Gibson
On 3/5/09 Thu Mar 5, 2009 1:48 AM, Rock Lifestyle lifestyle.r...@yahoo.in scribbled: Hi ,   My directory structure is like   [snipped]   I want to copy some subdirectory and files under it to another directory it should exactly create similar directory structure Use the

Re: Printing directory sizes

2009-03-05 Thread Dermot
2009/3/5 Gunnar Hjalmarsson nore...@gunnar.cc: Lauri Nikkinen wrote: ... from this script I get The total size of the file in etc is 15712.35 Kb The total size of the file in etc is 15.34 Mb and when I check this from Win XP Explorer (folder properties) window I get Size: 372 KB (380

Re: Printing directory sizes

2009-03-05 Thread Lauri Nikkinen
Well, I tried also this, ...snip... foreach my $dir (@directories) { find(\wanted, $dir); ### Not sure how that worked as you called it $directory print The total size of the file in $dir is . sprintf(%.2f Kb, ($total_size_of_files_in_dir * 0.0009765625)) . \n;

Re: Printing directory sizes

2009-03-05 Thread Lauri Nikkinen
Thanks, although is does not change the differences between dir sizes from this script and Win Explorer folder properties. This e.g. shows that one of my folders has 88 mb size although in fact it is empty. Thank you all, I'll give up... -L 2009/3/5 Dermot paik...@googlemail.com 2009/3/5

Re: Printing directory sizes

2009-03-05 Thread Dermot
2009/3/5 Lauri Nikkinen lauri.nikki...@iki.fi: Thanks, although is does not change the differences between dir sizes from this script and Win Explorer folder properties. This e.g. shows that one of my folders has 88 mb size although in fact it is empty. Thank you all, I'll give up... -L

Re: Printing directory sizes

2009-03-05 Thread Lauri Nikkinen
I had to add $total_size_of_files_in_dir = 0; because it was accumulating. Now it does what is should do and I get the correct results!!! ---code--- #!/bin/perl use warnings; use strict; use File::Find; my $path = $ARGV[0]; die You must supply a full directory path unless (-e $path -d

Re: Copy file recursively

2009-03-05 Thread Octavian Râşniţă
Hi, Use File::Copy::Recursive: NAME File::Copy::Recursive - Perl extension for recursively copying files and directories SYNOPSIS use File::Copy::Recursive qw(fcopy rcopy dircopy fmove rmove dirmove); fcopy($orig,$new[,$buf]) or die $!; rcopy($orig,$new[,$buf]) or die $!;

Re: Printing directory sizes

2009-03-05 Thread Gunnar Hjalmarsson
Dermot wrote: snip This will only give you the top level of directories: 07/02/2009 14:00DIR . 07/02/2009 14:00DIR .. 07/02/2009 14:00DIR bin 15/03/2006 22:14DIR eg 07/02/2009 14:00DIR html 15/03/2006 22:15DIR

Re: Printing directory sizes

2009-03-05 Thread Gunnar Hjalmarsson
Gunnar Hjalmarsson wrote: Dermot wrote: snip This will only give you the top level of directories: 07/02/2009 14:00DIR . 07/02/2009 14:00DIR .. 07/02/2009 14:00DIR bin 15/03/2006 22:14DIR eg 07/02/2009 14:00DIR html