Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

perl interpreters

Featured Replies

Ok after getting perl working in IIS now I have a more difficult task. I have a perl script that works in linux that just isn't working in windows.

Here is the script

#!c:\perl\bin\perl.exe

use WWW::Mechanize;

my $m = WWW::Mechanize->new();

my $someimage="imagelocation.jpg";

$m->get($someimage);

my $data = $m->content;

my $contenttype=$m->ct;

print "Content-type: " . $contenttype . "\n\n";

print $data;

I installed www::mechanize using activeperl's configuration If anyone wants steps I'll post them. Its pretty easy though.

Anyways when I point to my script the image is all messed up.

Like I said this script works flawlessly in linux.

My next step is to try out the cygwin version of perl and see if that fixes things.

I'll have to install the www::mechanize for it too. For it I think I have to use the cpan install method

Ah ha further testing shows it to be activeperl.

I slightly modified my script to not print the Content stuff and tested it on the commandline

like so "./image.pl > image.jpg"

using Active perl the image is messed up

using cygwin's perl its A OK

so now I need to figure out how to use cygwin's perl in IIS.

It was easy enough I just had to change the 2 places I mentioned from c:\perl\bin\perl.exe to c:\cygwin\bin\perl.exe

But I learned I didn't even have to do that.

by default activeperl prints \r\n for all \n to prevent this I have to tell it to print in binarymode

so I added the line

binmode(stdout);

before the print lines and everything works good.

Edited by jeff.sadowski


Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.