Search Results

Search: Posts Made By: guidely
1,491
Posted By Skrynesaver
oops I forgot to generalise the frame length when...
oops I forgot to generalise the frame length when setting the values.

#!/usr/bin/perl
use strict;


# In a production system these should be validated before progessing, but for now...
print...
1,491
Posted By Skrynesaver
Ahh, that's a bit more complex than the usual...
Ahh, that's a bit more complex than the usual learning Perl question, at the risk of undoing the learning value of the exercise try the following


#!/usr/bin/perl
use strict;


# In a...
2,778
Posted By Shell_Life
Why can't you use: rm /dir/test.txt
Why can't you use:
rm /dir/test.txt
1,523
Posted By birei
The $file variable is out of scope when you check...
The $file variable is out of scope when you check it. It doesn't exists when the foreach loop ends. Try using an additional array variable.


$ #!/usr/bin/perl -w
print "Enter Advance Search...
1,772
Posted By durden_tyler
$ $ $ # list the name and sizes of all text...
$
$
$ # list the name and sizes of all text files in the current directory
$
$ wc *.txt
0 0 0 a.txt
1 1 3 b.txt
1 1 5 c.txt
1 11 51 d.txt
3 13 59 total
$
$
$ # display the...
1,596
Posted By itkamaraj
$ cat test.pl #!/usr/bin/perl $files = "list...
$ cat test.pl
#!/usr/bin/perl
$files = "list jpg";
@patterns = split(/ /,$files);
@files = <*$patterns[1]>;
foreach $file (@files) {
print $file . "\n";
}
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 03:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy