11 lines
284 B
Perl
11 lines
284 B
Perl
#!/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");
|
|
} |