>push @files, @dirfiles;
>}
>
>return {
>src_uri => $src_uri,
>dest_uri => $dest_uri,
>files => \@files
>};
> }
>
> sub prompt_to_continue
> {
>my ($instructions) = @_;
>print Dumper $instructions;
>print "Continue? (yes/no) ";
>exit(1)
> "JWK" == John W Krahn writes:
JWK> Uri Guttman wrote:
>>> "JWK" == John W Krahn writes:
>>
>> that is called 4 arg substr and it is way underused in perl. this
>> benchmark shows the significant speedup of about 2x:
>>
>>
>> use Benchmark qw( cmpthese ) ;
>>
>>
Uri Guttman wrote:
"JWK" == John W Krahn writes:
JWK> Or as:
JWK> $_ = "$directory/$_" for @dirfiles[ 1 .. $#dirfiles ];
just to show another way that is usually faster for prepending a string:
substr( $_, 0, 0, "$directory/" ) for @dirfiles[ 1 .. $#dirfiles ]
> "BM" == Brandon McCaig writes:
BM> On Tue, May 31, 2011 at 4:34 PM, Uri Guttman wrote:
>> just to show another way that is usually faster for prepending a string:
>>
>> substr( $_, 0, 0, "$directory/" ) for @dirfiles[ 1 .. $#dirfiles ];
>>
>> that is called 4 arg subst
On Tue, May 31, 2011 at 4:34 PM, Uri Guttman wrote:
> just to show another way that is usually faster for prepending a string:
>
> substr( $_, 0, 0, "$directory/" ) for @dirfiles[ 1 .. $#dirfiles ];
>
> that is called 4 arg substr and it is way underused in perl. this
> benchmark shows the
On Tue, May 31, 2011 at 4:23 PM, John W. Krahn wrote:
> Just a couple of comments on some of your code. :)
>
*snip*
>> @lines = @lines[$start_line..$#lines];
>
> You are copying almost all of @lines to @lines when you should be using
> perl's built-in functions to just remove elements from @l
> "JWK" == John W Krahn writes:
JWK> Or as:
JWK>$_ = "$directory/$_" for @dirfiles[ 1 .. $#dirfiles ];
just to show another way that is usually faster for prepending a string:
substr( $_, 0, 0, "$directory/" ) for @dirfiles[ 1 .. $#dirfiles ];
that is called 4
Brandon McCaig wrote:
Hello,
Just a couple of comments on some of your code. :)
my $start_line = 2;
unless($lines[1] =~ /^\s*$/)
{
warn "The second line isn't empty" ;
$start_line--;
}
@lines = @lines[$start_line..$#lines];
You are copying a
On Tue, May 31, 2011 at 2:15 AM, Agnello George
wrote:
> i am given ever day a list of files which i wget within a parent folder .
>
> my team gives me a structure where theses files are located
*snip*
> using the above data given to me i check whether the files exist and if
> they do i do
> ls
>>
>> index.php 123.php dual.templ dual_2.templ go.php data.txt
>>
>> i need to create a tar of this in the same given format
>>
>> index.php
>> dualfilder/dual.templ dual_2.templ
>> go/go.php
>> go/numbers/123.php
>> data/data.php
>>
>>
>> i cant seem to come up with a a logic on how to g
On 31/05/2011 07:15, Agnello George wrote:
HI
i am given ever day a list of files which i wget within a parent folder .
my team gives mea structure where theses files are located
cat /home/upload_files1.txt
download the files form wget http://localserver/website1 and
On May 31, 2011 2:16 AM, "Agnello George" wrote:
>
> HI
>
>
> i am given ever day a list of files which i wget within a parent folder
.
>
> my team gives mea structure where theses files are located
>
>
> cat /home/upload_files1.txt
> download the files form wget http://loc
HI
i am given ever day a list of files which i wget within a parent folder .
my team gives mea structure where theses files are located
cat /home/upload_files1.txt
download the files form wget http://localserver/website1 and upload on
http://prodserver/weebsite1
index.
13 matches
Mail list logo