#!/usr/bin/perl -w use strict; use Win32::API; Win32::API->Import("kernel32", "LPTSTR GetCommandLine()"); my $cl = GetCommandLine(); printf "%d : '%s'\n", length( $cl ), $cl; my $cl2 = pack 'Z*', GetCommandLine(); printf "%d : '%s'\n", length( $cl2 ), $cl2; __END__ C:\test>junk3 46 : '"c:\perl\bin\perl.exe" -sw "C:\test\junk3.pl" ' 47 : '"c:\perl\bin\perl.exe" -sw "C:\test\junk3.pl" '