Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A Perl script to manage file types and creators' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A Perl script to manage file types and creators
Authored by: clarkcb on Dec 05, '03 02:01:59PM

Unless Getopt::Std handles this behind the scenes, it looks like one thing is missing from these scripts: passing the file arguments to the glob function to get a list of files from arguments like '*.txt':


@files = ();
foreach $arg (@ARGV) {
    push @files, glob($arg);
}


[ Reply to This | # ]
A Perl script to manage file types and creators
Authored by: dierauer on Dec 05, '03 02:14:14PM

I don't understand why you'd need to do this; for something like '*.txt', the shell will pass the list of files to perl.

Please give more details.



[ Reply to This | # ]
A Perl script to manage file types and creators
Authored by: clarkcb on Dec 05, '03 05:55:55PM

Oops, you're right, sorry. I don't recall why now, but I used to have to do this. Anyway, please disregard previous post.



[ Reply to This | # ]