<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Perl Execute Help in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836903#M100616</link>
    <description>I have no problem at all running perl in .bat files, in fact, I just run this exact file as test.bat and it behaved exactly as expected:&lt;BR /&gt;&lt;BR /&gt;perl -i.save -p -e "s/DEVELOP/PRODUCTION/gi" xx.txt&lt;BR /&gt;&lt;BR /&gt;I suspect what is wrong is that your @INC is not setup correctly. &lt;BR /&gt;&lt;BR /&gt;Execute perl -V and look for @INC very near the end of your output. &lt;BR /&gt;&lt;BR /&gt;You can set @INC by add -I arguments to your perl execution line and this is required if you are running for example, a pre-exec for Data Protector&lt;BR /&gt;&lt;BR /&gt;Your command would look something like this:&lt;BR /&gt;&lt;BR /&gt;perl -I C:/Perl/lib -I C:/Perl/site/lib myscript.pl&lt;BR /&gt;&lt;BR /&gt;assuming that C:\Perl\bin is also somewhere in your PATH --- and no, I did not get the slashes backwards for the -I argument --- and why aren't you asking a Windows question elsewhere??&lt;BR /&gt;</description>
    <pubDate>Thu, 03 Aug 2006 14:47:42 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2006-08-03T14:47:42Z</dc:date>
    <item>
      <title>Perl Execute Help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836902#M100615</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I need help:   I try to get UNIX shell scripts working in Windows environment by using perl, somehow I fail.&lt;BR /&gt;&lt;BR /&gt;1) on cmd prompt:&lt;BR /&gt;perl -i.save -p -e "s/DEVELOP/PRODUCTION/gi" c:\temp\test1.txt &lt;BR /&gt;&lt;BR /&gt;it is working as desired.&lt;BR /&gt;&lt;BR /&gt;2) if I make a mytest.pl file as&lt;BR /&gt;&lt;BR /&gt;c:\perl\bin\perl.exe -i.save -p -s  "s/DEVELOP/PRODUCTION/gi" c:\temp\test1.txt&lt;BR /&gt;&lt;BR /&gt;then execute from cmd prompt as c:\perl\bin\perl mytest.pl, I get error like "panic: uf16_to_uft8: odd bytlen 155"&lt;BR /&gt;&lt;BR /&gt;3) if I make a batch file test.bat as&lt;BR /&gt;&lt;BR /&gt;c:\perl\bin\perl.exe -i.save -p -e "s/DEVELOP/PRODUCTION/gi" c:\temp\test1.txt&lt;BR /&gt;&lt;BR /&gt;from cmd prompt issue test.bat, or use AT command for scheduling, batch is executed, but nothing happened to the file.&lt;BR /&gt;&lt;BR /&gt;4) I have 10+ batches consisting of a whole job.  In UNIX, shell script makes it easy by just listing each command as "sh a1" as 1st, "sh a2" as 2nd, and so on in a file.  The job will be executed in order.&lt;BR /&gt;&lt;BR /&gt;In windows, I would like to see how people get around to do the job.   Please help as you can.&lt;BR /&gt;&lt;BR /&gt;Appreciated.&lt;BR /&gt;&lt;BR /&gt;Steven</description>
      <pubDate>Thu, 03 Aug 2006 14:27:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836902#M100615</guid>
      <dc:creator>Steven Chen_1</dc:creator>
      <dc:date>2006-08-03T14:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Execute Help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836903#M100616</link>
      <description>I have no problem at all running perl in .bat files, in fact, I just run this exact file as test.bat and it behaved exactly as expected:&lt;BR /&gt;&lt;BR /&gt;perl -i.save -p -e "s/DEVELOP/PRODUCTION/gi" xx.txt&lt;BR /&gt;&lt;BR /&gt;I suspect what is wrong is that your @INC is not setup correctly. &lt;BR /&gt;&lt;BR /&gt;Execute perl -V and look for @INC very near the end of your output. &lt;BR /&gt;&lt;BR /&gt;You can set @INC by add -I arguments to your perl execution line and this is required if you are running for example, a pre-exec for Data Protector&lt;BR /&gt;&lt;BR /&gt;Your command would look something like this:&lt;BR /&gt;&lt;BR /&gt;perl -I C:/Perl/lib -I C:/Perl/site/lib myscript.pl&lt;BR /&gt;&lt;BR /&gt;assuming that C:\Perl\bin is also somewhere in your PATH --- and no, I did not get the slashes backwards for the -I argument --- and why aren't you asking a Windows question elsewhere??&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Aug 2006 14:47:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836903#M100616</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-08-03T14:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Execute Help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836904#M100617</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;1) OK&lt;BR /&gt;2) You have to put perl code into the .pl file, not the command itself:&lt;BR /&gt;c:\ type mytest.pl&lt;BR /&gt;s/DEVELOP/PRODUCTION/gi&lt;BR /&gt;c:\ \perl\bin\perl.exe -i.save -p \temp\mytest.pl \temp\test1.txt&lt;BR /&gt;&lt;BR /&gt;3) The .bat should work, if all required parameters and options are founnd in it.&lt;BR /&gt;consider a&lt;BR /&gt;C:&lt;BR /&gt;or equiv. to get a well defined '\'&lt;BR /&gt;&lt;BR /&gt;At jobs need a 'cmd /c' wrapped around a .bat  mostly.&lt;BR /&gt;&lt;BR /&gt;4) Write your script completly in perl.&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;... who normally tries to avoid to deal with such PC stuff.</description>
      <pubDate>Thu, 03 Aug 2006 14:50:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836904#M100617</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-08-03T14:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Execute Help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836905#M100618</link>
      <description>In windows environments I install Cygwin. That's probably the only sane way to work with windows anyway.&lt;BR /&gt;&lt;BR /&gt;Feel free to give no points if this is totally useless info for you.&lt;BR /&gt;&lt;BR /&gt;Windows is hateful. In all respects.&lt;BR /&gt;&lt;BR /&gt;You might try binmode or -C3 option&lt;BR /&gt;&lt;BR /&gt;binmode STDIN, ":utf8";&lt;BR /&gt;binmode STDOUT, ":utf8";&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Aug 2006 14:51:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836905#M100618</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2006-08-03T14:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Execute Help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836906#M100619</link>
      <description>A. Clay,&lt;BR /&gt;&lt;BR /&gt;You are exactly right.   "perl -V" returns with:&lt;BR /&gt;&lt;BR /&gt;Perl lib version &lt;V5.8.3&gt; doesn't match executable version  (v5.8.8&amp;gt; at d:\oracle\product\.....\perl\5.8.3\lib.MSWin32-x86-...../config.pm line 32.  compilation failed in require.&lt;BR /&gt;&lt;BR /&gt;I have Oracle 10g installed before installing perl 5.8.8.   &lt;BR /&gt;&lt;BR /&gt;Do you think uninstalling perl 5.8.8 then installing 5.8.3 will work?  Or just use Oracle perl binary?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;/V5.8.3&gt;</description>
      <pubDate>Thu, 03 Aug 2006 15:14:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836906#M100619</guid>
      <dc:creator>Steven Chen_1</dc:creator>
      <dc:date>2006-08-03T15:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Execute Help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836907#M100620</link>
      <description>You are now asking official stupid Windows questions. Have you looked at the Forum under which you are posting? I have already soiled my hands enough but on UNIX boxes multiple versions of Perl have no trouble co-existing -- if you know what you are doing. Find yourself a Windows forum or a Perl forum but whatever you are asking it ain't HP-UX!!!</description>
      <pubDate>Thu, 03 Aug 2006 15:20:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836907#M100620</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-08-03T15:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Execute Help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836908#M100621</link>
      <description>A. Clay,&lt;BR /&gt;&lt;BR /&gt;Sorry to bother you, I wasn't pay realized that it is hpux forum.&lt;BR /&gt;&lt;BR /&gt;Thanks for any help.</description>
      <pubDate>Thu, 03 Aug 2006 15:28:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-execute-help/m-p/3836908#M100621</guid>
      <dc:creator>Steven Chen_1</dc:creator>
      <dc:date>2006-08-03T15:28:54Z</dc:date>
    </item>
  </channel>
</rss>

