|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
I was hoping I could use a command like
$onefile = 'ls -l $names[$loop]'; where $names[$loop] holds the name of a file It does not work though. Obviously what I am trying to do is get a listing for a single file. Anyone tell me why the above line does not work or an alternative method. Thanks ------------------ |
|
#2
|
|||
|
|||
|
my @files = ('file1', 'file2', 'etc');
foreach my $file (@files) { my $onefile = `ls -l $file`; } (i'm assuming your problems was interpolation of the array elemenent and not single quotes vs. tick ( ' vs. ` ) |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > listing with variables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|