Global symbol "$regex" requires explicit package name at ./1.pl line 11. syntax error at ./1.pl line 14, at EOF (Might be a runaway multi-line ;; string starting on line 11) Execution of ./1.pl aborted due to compilation errors.