Tuesday, September 11, 2012

Perl - [ Exists File | System Command ]

#!/usr/bin/perl
use strict;
use warnings;

if(-e "tmp.pl"){

    print "File exists tmp.pl\n";

    system("echo Yes File > tmp.txt");
}else{

    print "File not exists tmp.pl\n";

    system("echo No File > tmp.txt");
}

0 comentários:

Post a Comment