Re: Probably silly question about loop

2007-09-05 Thread Mike Martin
On 05/09/07, Tom Phoenix <[EMAIL PROTECTED]> wrote: > On 9/5/07, Mike Martin <[EMAIL PROTECTED]> wrote: > > > I am having a problem with looping a string. > > Have you tried stepping through your code in the debugger? > > > while ($count lt $str_length){ > > That looks like a place where you used a

Re: Probably silly question about loop

2007-09-05 Thread Tom Phoenix
On 9/5/07, Mike Martin <[EMAIL PROTECTED]> wrote: > I am having a problem with looping a string. Have you tried stepping through your code in the debugger? > while ($count lt $str_length){ That looks like a place where you used a string comparison ('lt') but maybe meant a numeric comparison ('<

Re: Probably silly question about loop

2007-09-05 Thread Gunnar Hjalmarsson
Mike Martin wrote: I am having a problem with looping a string. This is my code my $count=0; my $str_length=length($string1); while ($count lt $str_length){ This code only runs once not any more You are using the wrong operator to compare numbers. See "perldoc perlop". --

Probably silly question about loop

2007-09-05 Thread Mike Martin
I am having a problem with looping a string. This is my code my $string="ffmpeg -v 2 -i \"/home/mike/vcr58uc.avi\" -itsoffset -0.1 -i \"/home/mike/vcr58uc.avi\" -target dvd -y -s 352x288 -qscale 5 -bf 2 -g 15 -acodec mp2 -ac 2 -ab 64kk -me_range 63 -aspect 4:3 -map 1:0 -map 0:1 \"/home/mike/vcr

Re: MP3::Tag vs iTunes

2007-09-05 Thread Francisco Ugarte Rivas
Maybe you could try using MP3::Info, i use it and it works, but i dont have tried against iTunes, Find it at: http://search.cpan.org/~cnandor/MP3-Info-1.13/Info.pm Good luck... On Sep 4, 9:21 am, [EMAIL PROTECTED] (Evyn) wrote: > Hi, > > I have been trying to use MP3::Tag to change tags before

Re: How to read Perl source code

2007-09-05 Thread Paul Johnson
On Wed, Sep 05, 2007 at 09:42:18PM +0800, PeiYu Zeng wrote: > I'd like to read the built-in fuctions' code such as 'split', > but I don't know where it is in perl source code (e.g. perl-5.8.8). > > Can you tell me how to locate it? http://search.cpan.org/CPAN/authors/id/N/NW/NWCLARK/perl-5.8.8.t

Re: Transform my algorithm in perl. Ideas?

2007-09-05 Thread Peter Scott
On Wed, 05 Sep 2007 14:56:27 +0200, Shams Fantar wrote: > Gunnar Hjalmarsson wrote: >> Shams Fantar wrote: >>> Gunnar Hjalmarsson wrote: opendir my $d, $dir or die $!; my @oldfiles = grep -f "$dir/$_" && -M _ > 10, readdir $d; if ( @oldfiles ) { # do som

RE: How to read Perl source code

2007-09-05 Thread Andrew Curry
The majority of these are compiled c programs. Im not sure of split but I know many are many which are. -Original Message- From: PeiYu Zeng [mailto:[EMAIL PROTECTED] Sent: 05 September 2007 14:42 To: beginners@perl.org Subject: How to read Perl source code I'd like to read the built-in

How to read Perl source code

2007-09-05 Thread PeiYu Zeng
I'd like to read the built-in fuctions' code such as 'split', but I don't know where it is in perl source code (e.g. perl-5.8.8). Can you tell me how to locate it? Thanks, Cheellay Zen

Re: Transform my algorithm in perl. Ideas?

2007-09-05 Thread Shams Fantar
Gunnar Hjalmarsson wrote: Shams Fantar wrote: Gunnar Hjalmarsson wrote: opendir my $d, $dir or die $!; my @oldfiles = grep -f "$dir/$_" && -M _ > 10, readdir $d; if ( @oldfiles ) { # do something } Thank you for this solution, but I would prefer to write it myself. ;-

Re: Reading a log file from backwards

2007-09-05 Thread Rob Dixon
sivasakthi wrote: On Wed, 2007-09-05 at 07:06 -0400, Chas Owens wrote: On 9/4/07, sivasakthi <[EMAIL PROTECTED]> wrote: snip Thanks for your suggestions.. but i need to read a file from backwards... First time reading from backwards & set the last line position to one variable..next time read

Re: Reading a log file from backwards

2007-09-05 Thread sivasakthi
On Wed, 2007-09-05 at 07:06 -0400, Chas Owens wrote: > On 9/4/07, sivasakthi <[EMAIL PROTECTED]> wrote: > snip > > Thanks for your suggestions.. but i need to read a file from backwards... > > First time reading from backwards & set the last line position to one > > variable..next time reading ba

Re: Reading a log file from backwards

2007-09-05 Thread Chas Owens
On 9/4/07, sivasakthi <[EMAIL PROTECTED]> wrote: snip > Thanks for your suggestions.. but i need to read a file from backwards... > First time reading from backwards & set the last line position to one > variable..next time reading backwards until reach that variable position... > is it possible t