On unix, you should use #!/usr/bin/perl (or sometimes some variation on it). Did you have the permissions set right?
#!/usr/bin/perl