hello,
I want to test if the value writing in the prompt is not empty;
i've use astructure control : unless but if i write no value and i press enter, in my file i found this
SYS=
or if no value is written , normally i can't exit from the structure control.
my code
thanks
I want to test if the value writing in the prompt is not empty;
i've use astructure control : unless but if i write no value and i press enter, in my file i found this
SYS=
or if no value is written , normally i can't exit from the structure control.
my code
Code:
#!/usr/bin/perl -w
use strict;
open FILE, ">./fic.cfg";
print "SYS Value = \n";
my $SYS=<stdin>;
unless ($SYS)
{
print "SYS Value =\n";
my $SYS=<stdin>;
}
print FILE "SYS=$SYS\n";
thanks