Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Problem with uploaded (http) files with File::MMagic

by CountZero (Bishop)
on Dec 22, 2012 at 15:33 UTC ( #1010023=note: print w/ replies, xml ) Need Help??


in reply to Problem with uploaded (http) files with File::MMagic

Invalid type 'regex' at line 271
The program you show only has 10 lines. Examine this line 271 and see what caused this error.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics


Comment on Re: Problem with uploaded (http) files with File::MMagic
Re^2: Problem with uploaded (http) files with File::MMagic
by Anonymous Monk on Dec 22, 2012 at 16:03 UTC
    Actually, that is all of my 'test' program

    Line 271 appears to refers to /usr/share/file/magic.mime

    I do see that there are some differences in the magic.mime file for systems.

      Well it's a good thing you didn't show us the contents of line 271 of your /usr/share/file/magic.mime file. Otherwise we might have a clue to the problem. We wouldn't want that, would we?

      On a more serious note, I briefly looked over my local /usr/share/file/magic.mime file and didn't see anything particularly different in the region of line 271, but at line 303 in mine, I have the line:

      #0 regex BEGIN[[:space:]]*[{] application/x-awk

      and at line 640:

      0 regex [Cc]onstant[[:space:]]+[Ss]tory text/x-inform

      Those are the only two lines mentioning 'regex' in my file. Perhaps you could make a copy of your file and remove the regex lines and see if it works?

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2014-12-19 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (82 votes), past polls