Questions tagged [perlscript]

PerlScript is a scripting engine to run Perl scripts on either ASP or WSH.

PerlScript was initially solely an ActiveX Scripting Engine produced by the company ActiveState for use with Microsoft's Internet Information Services that allows for programmers to use -based code in addition to, or in place of, or in the context of web servers running the protocol.

Subsequently Apache::ASP was created for the web server, which allows for coding with only Perl, but neither VBScript nor JScript. Similar to VBScript, PerlScript can also be used to write programs for Windows Script Host .

52 questions
1
vote
0 answers

want to unzip a specific file from zipped file

I have a directory where zipped file is placed. I want to extract it but I need only xml document from it. I am able to extract whole file but I need only xml file. I need it in perlscript only on windows platform.
1
vote
1 answer

Unexpected behaviour in LDAP query written in Perl

I'm trying to implement a simple LDAP query in Perl. I want to retrieve the 'dc' attribute from all the 'dnsZone' objects from the domain. I first wrote it using dsquery and it works perfectly: dsquery * "DC=iii,DC=hogent,DC=be" -attr dc -scope…
wardva
  • 624
  • 9
  • 28
1
vote
2 answers

How to merge records in csv file based on first field?

I have a csv file, id1,v1,v2,v3,v4 id2,v1,v2,v6,v4 id1,v7,v8,v3,v9 id1,v10,v11,v12,v13 id2,v3,v5,v8,v7 since, the file is not sorted, and should not be! I want output as: id1,v1|v7|v10,v2|v8|v11,v3|v12,v4|v9|v13 …
Nitinkumar Ambekar
  • 969
  • 20
  • 39
1
vote
3 answers

Use Perl to count occurrences of all words in a file or in all files in a directory

So I am trying to write a Perl script which will take in 3 arguments. First argument is the input file or directory. If it is a file, it will count number of occurrences of all words If it is a directory, it will recursively go through each…
Harley Jones
  • 167
  • 6
  • 20
0
votes
0 answers

How to add an option to enable changes in perlscript using the environment variables method?

Using either the -rundir or the environment variable method i want to add an option to the perlscript to enable changes and Check if current memory(sum of the pid process+ subprocess memory)is more than previous max, log the memory of each process…
0
votes
1 answer

windows Perl script run on LINUX

I'm trying to let a windows perl script run on linux, but it's not work, I want to know what mistake I made. Originally, it was running on windows and connect to the local mysql db, but now I want to transfer it to linux. I installed docker on Linux…
3728eo3
  • 1
  • 2
0
votes
1 answer

How to compare two perl object values?

I need to compare two Perl object values, one is from a variable and another one is from an array value ImmediateParent and data contain path directive values(C:\Users\Public\Documents) while (length(basename(dirname(($immediateParent)))) > 1) { …
Magesh Maggi
  • 269
  • 2
  • 10
0
votes
1 answer

Determine if a value is numeric in perl script

My perl script takes the first command line argument and sets '$numlines' to it. Then I have an if statement that is supposed to determine if numlines is numeric (I want to use this value later if it is numeric) but even when I input a numeric value…
Tory
  • 109
  • 11
0
votes
1 answer

Get current real user in a perl script which is executed inside a docker container as root

I want to execute a perl script inside a docker container as root (SUDO on the host), and get the real user id inside the perl script. For eg., below execution should enable myscript.pl to get the real userId (mat in this case), without having to…
Joby Job
  • 1
  • 2
0
votes
2 answers

How to replace some patterns with whitespace in perl?

I'm having a file in which there are lines containing some patterns as `XX3 DB3 DBB1 VDD VSS VSSS VDDS inverter params: ln=.045u wn=0.5 mm=mm' `XX4 DBB1 DB3 VDD VSS VSSS VDDS inverter params: ln=.045u wn=.12u `XX14 DBB1 DB_TBY VDD VSS VSSS VDDS…
0
votes
2 answers

Code hangs when writing log message to text file by multiple source using Perl Script

I am using below code to write log message to text file, the program is getting hanged when different source calls this method in parallel. Is there a way to grant /control parallel writing without breaking the program. sub sLog { my $self =…
Pradeep H
  • 592
  • 2
  • 7
  • 27
0
votes
3 answers

Regular Expressions on variable in Perl

I have value E.1.1.1 in a variable, I want E111 stored in different variable. $var1 = "E.1.1.1"; $var1 =~ s/\.//g; The above code changes the value in $var1 variable. I want to try as below. $var2 = s/\.//g $var1; Suggest how to do. I am new to…
Sriram P
  • 179
  • 1
  • 13
0
votes
1 answer

How to write data retrieved from DB into 2D array and how can this be retrieved back in Perl?

I tried below for writing data into two dimensional array(array_source) but ended up in single dimensional array(array_source).. Below is code snippet, please review and let me know the ways to write it into 2D array so that it can be . $DBHd =…
Devoloper250
  • 753
  • 2
  • 8
  • 12
0
votes
0 answers

How to remove keyboard emoticons from string in perl?

I am facing problem to remove keyboard emoticons from string. Keyboard emoticons display in URL So I use this regex to remove emoticons but this regex also remove Chinese character from string. I want regex remove only keyboard emoticons rather then…
Aditya Tomar
  • 175
  • 1
  • 3
  • 9
0
votes
1 answer

How to use "/" (forward slash) in string?

I want to use "/" (forward slash) in string in script but I am getting following error. I have following applescript to replace content in file. Syntax: do shell script "perl -pi -e 's/oldtext/newtext/g' " & quoted form of (POSIX path of…
Nanji Mange
  • 2,155
  • 4
  • 29
  • 63