Write a perl script that takes one argument, the name of a file or directory. The script should call the stat function and print the resulting data along with a one line explanation of each field.my $args;$args=@ARGV;if ($args<1){    die(Expecting a filename);}sub showstat{      print  $_[0] dev, device number of filesystem\n;      print  $_[1] ino,      inode number\n;      print  $_[2] mode,     file mode  (type and permissions)\n;      print  $_[3] nlink,    number of (hard) links to the file\n;}my $filename=$ARGV[0];if (open (TESTFILE,$filename)){    my @filedata= stat(TESTFILE);    &showstat(@filedata);    close (TESTFILE);}else{    print error on open $filename;}My question is if $args=@ARGV, shouldn't $ARGV[0] equal to $args[0] instead of $filename=$ARGV[0]? Why not?and under where it says @showstat(@filedata), why do you put the ampersand? (i know by definition it is a subroutine), but can I get a clarification what the actual function do in here?
Perl confused with script
perl