Thread CD in String umwandeln (8 answers)
Opened by Gast at 2007-11-09 18:05

topeg
 2007-11-10 20:55
#102187 #102187
User since
2006-07-10
2611 Artikel
BenutzerIn

user image
in meinem Beispiel fehlt die Abfrage, ob es eine Datei ist. (siehe "-f $File::Find::name")
Also so:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl

use strict;
use warnings;
use File::Find;

my $path_to_cd='/medie/cd0/';

my $file_data_from_cd;

find(sub{ $file_data_from_cd.=do{ local ( @ARGV,$/ ) = $File::Find::name; <> } if(-f $File::Find::name); },$path_to_cd);

## Tuh was mit den Daten in $file_data_from_cd ...

View full thread CD in String umwandeln