开发者

Web Hosting Issues using my perl script, need help deciding on what language to use to replace perl [closed]

开发者 https://www.devze.com 2023-01-12 17:19 出处:网络
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 4 years ago.

Improve this question

I have a website that I am making and I was going to implement a perl script into it. This script goes to another page gets a .csv file and reads in the lines and pars开发者_运维百科es out what I need. The problem I have just ran into is that my hosting server apparently does not allow custom CGI scripts on an MS server. I chose the MS server so I could use ASP and apparently lost other functionality when doing so. Is there another language that I can use to get the same effect as my perl script? Here is what I have been using in perl(this is not all of the script, I didnt feel it was necessary to post it all):

 sub getFile{
        my $mech = WWW::Mechanize->new();
        $mech->get('example.com');
            die "Error: failed to load the web page" if (!$mech->success());
        $mech->follow_link( url_regex => qr/yesterday_hail/i );
            die "Error: failed to load the web page" if (!$mech->success());
        $mech->save_content("somefile".csv");
    }

It would then do a bunch of work to the file and output that. Really what I was wanting was just this part and I dont know how to do it in other languages.


Can you run your perl script or invoke perl at all from ASP? I'm not at all familiar with ASP, but I assume this is possible unless your hosting provider bars it.

First rule of hosting is if your provider doesn't do what you want, look for a new provider that does...


Given that you chose the server because it supported ASP, then one of the languages your ASP environment supports would be a logical choice. That suggests VBScript as the language.


Why can't you use ASP.NET and what makes you implement this task on Perl?

Upd

Well, consider what technologies you know other than Perl that can be run on your server. Anyway, ASP.NET could be the best choice on MS platform for small web applications and is easy to use if C# is already easy thing for you. ASP.NET MVC should be better for big applications and that's not the case here, i think.

For Perl development i usually use *nix VM writing and running server there and not on Windows. You could develop this way, locally, and use some simple Unix-hosting for publishing if anyone else needs access.

0

精彩评论

暂无评论...
验证码 换一张
取 消