Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Find images regardless of filetype extension.

by blazar (Canon)
on Aug 04, 2005 at 11:02 UTC ( [id://480764]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -MO=Deparse -e '<*>'
    use File::Glob ();
    glob('*');
    -e syntax OK
    
  2. or download this
        foreach $file (@files) {
            open FH, $file or
                die "Error opening $file: $!\n";
    
  3. or download this
    for my $file (@files) {
        open my $fh, '<', $file or
    ...
        # ...
        # no need for an explit close() 
    }
    
  4. or download this
    $ cat foo.pl
    #!/usr/bin/perl
    ...
    
    $ cat foo.pl
    Gotcha!
    
  5. or download this
          elsif ( data =~ /^\x89PNG\x0d\x0a\x1a\x0a/) {
             type = 'PNG';
          }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://480764]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-25 05:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found