You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
284 B
Perl
11 lines
284 B
Perl
5 years ago
|
#!/usr/local/bin/perl
|
||
|
|
||
|
print ("Enter the name of the file:\n");
|
||
|
$filename = <STDIN>;
|
||
|
chop ($filename);
|
||
|
if (!(-e $filename)) {
|
||
|
print ("File $filename does not exist.\n");
|
||
|
} else {
|
||
|
$size = -s $filename;
|
||
|
print ("File $filename contains $size bytes.\n");
|
||
|
}
|