You can't write your lexer after the __END__ tag. You must write it inline where you declare your Inline::Flex section. If your lexer is so big that you need to separate it from the rest of your code, considermoving it to another package.

This is the command line used to generate the lexer. It defaults to 'flex -f -8 -oOUTPUT_FILE INPUT_FILE' where OUTPUT_FILE and INPUT_FILE are automatically replaced by Inline::Flex. This option allows to tweak the generated lexers. Look at the flex man page for more information.