How to run Linux Command Using Perl?
Method 1:
@a=print readpipe( "ls -l *" );
print @a;
Method 2:
open(my $file, '|-', "ls -l *.txt"); print $file;
Method 4:
@a=`ls -l *`; print "$a[3]";
Method 5:
@a=qx/ls -l */; print "$a[0]";
exec(" ls -l *");
[There's More Than One Way To Do It]
Always A Blog To Get Confident in Coding
0 Comments:
Post a Comment
Note: only a member of this blog may post a comment.
<< Home