Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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.


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

Replies are listed 'Best First'.
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?


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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1010023]
[LanX]: YM: talking about breaches ... did you read about Cambridge Analytica harvesting 50e6 FB profiles for political propaganda?
LanX ... oh ... Brexit delayed ... again ... oh wonder ...
[Your Mother]: Heh. I keeping seeing related headlines but my narcissism is a perihelion right now so I'm busy. :P
[LanX]: https://www. news/series/ cambridge- analytica-files
[Your Mother]: s/a /at /;
[LanX]: just watch the video ...
[Your Mother]: Roger, will co.

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (11)
As of 2018-03-19 13:19 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.