u should give it as $command=`ls -la`;
use the key on the top of TAB button with shift.. * Chaitanya "A man can get discouraged many times but he is not a failure until he stops trying..." "The difference between 'involvement' and 'commitment' is like an eggs-and-ham breakfast: the chicken was 'involved' - the pig was 'committed'."* [image: ic_mob.gif] me if u need any thing [image: preview_document.jpg] On Wed, May 26, 2010 at 6:19 PM, Andros Zuna <andros.z...@gmail.com> wrote: > Hi! > I am trying to write a perl code that will retry the same command over > and over again until the return value is 0. > This is what I got for now: > > #! /usr/bin/perl > use warnings; > use strict; > > $command = 'ls -l'; > > if (system($command) == 0) { > } > elsif(system($command != 0)) { > print "Failed to execute: $command\n"; > my $c++ > } > > I'm not shure to test it, because I don't know any unix commands that > gives other than 0 in return > (I'm a n00b, but willing and trying to learn), could anyone please > take a look and see if this is correct, and if not, help me?? > > Tnx :) >
<<preview_document.jpg>>
<<ic_mob.gif>>