First steps

#!/usr/bin/perl
 
#use chilkat;
 
$ftp_inn = "/home/jorn/ftp/";
$ftp_out = "/var/www/orange_checkout/ftp/";
 
 
 
 
chdir $ftp_inn;
 
 
 
$dir_lookup = qx(ls *.zip);
 
$i = 1;
foreach $item (split(/\n/,$dir_lookup)) {
    print $i." => \n".$item."\n";
 
    # Extraire le nom du repertoire ( moins '-xy~.zip') 
    $_ = $item;
    s/((-)[a-z]*(.zip))|(.zip)//gi;
    print "$_\n";
    $dir_name = $_;
 
    # Lire la date ( moins saute de ligne )
    $date = qx(date +'%Y%m%d%H%M%S');
    $_ = $date;
    s/\n$//gi;
    $dir_name .= '_'.$_;
 
    # Creer le repertoir 
    mkdir $ftp_out.$dir_name;
 
    # Unzip le zip dans le bonne reperoire
    $unzipped = qx(unzip $item -d $ftp_out$dir_name);
    print $unzipped."\n";
    $i++;
 
    # Construction du string pour appeller le orftphandler.php
    $appel_php = '';
}
 
 
 
 
 
 
 
 
#print "\n".substr($item,0,length($item)-4)."\n";
 
 
#$phrase = 'l1233eg.rbeen-lepommeTYeLee-beta.zip';
#$_ = $phrase;
#$cheche = /(zip)/;
#s/(-)[a-z]*(.zip)//gi;
#print "$_\n";
#print $phrase."\n";
 
 
 
#print while <STDIN>;
#print "Hello $_!\n" foreach qw(world Dolly nurse);