Main Topics
Browse All Topics Hi,
Im a complete newbie in perl coding,
and have a problem with the eprl version of E-Guest.
http://www.hotscripts.com/
The config seems pretty simple,
I have checked all the paths,
and everything works...
I am writing a perl script which should report the space used by a database in a single excel sheet daily, mean to say that it should append the data in the same spreadsheet. So how do I device a mechanism to determine which is the last row which...
Hi there, having a problem with perl.
I get this error when trying to run any perl script.
###
Can't locate strict.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.0
Hello,
With the help of Google, I have written a Perl Script (which uses Expect module) for login to multiple Linux servers and do some automation. This script basically takes the hostnames from a file 'serverlist' and login to one by one...
My /etc/apache2/sites-availab
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options FollowSymLinks +ExecCGI
#Options ExecCGI...
I'm at a total loss with this one.
This is an AWK scripting question. If someone can suggest a Perl solution, I'd take that one, too.
Of course I've already tried entering Alt-0162 and a variety of single quotings, double quotings, ticks,...
I need a good guestbook compatable with the problem of year 2000.
any answers ....
I have an ascii list of about 13,000 opt-in email addresses.
Each email address is on a separate line.
I need a browser based perl script that will help me extract the aol, hotmail and yahoo emails from that text file and separate them into...
I have a Perl script with these commands:
$prog = <<'EOF';
..email code
...log code
EOF
What does this do? Where is it pulling data in from when it says <<EOF?
Hello,
I currently have a working perl script that connects to a CSV list of Cisco devices and excecutes commands. The problem I have is that some of the devices are SSHv1 and SSHv2 which are being skipped. I'm looking for a command example...
I found the following PHP function on the net:
_________
<?php
// returns the percentage of the string "similarity"
function str_compare($str1, $str2) {
$count = 0;
$str1 = ereg_replace("[^a-z]", ' ', strtolower($str1));
...
Can anyone help me with a script that can retrieve e-mail addresses from my guestbook so that I may e-mail them?
Hi,
My mail script based on Net::SMTP is failing when I try to send to multiple recipients. I know why it's failing--because the multiple recipient formatting is incorrect. But I don't know the quickest way to fix it. According to the Perl...
I am trying to setup a new IIS site using Perl and PHP. I would like to start off by saying I have very little experience with IIS and No experience with Perl and PHP, so I apologize if i ask beginner questions. I have created handler mappings...
Does anyonw know what pbrun command does?
is there another alternate command to use and what is causing the error below.
solaris% pbrun /usr/bin/chown -R cbcadm "/upload/cbc/mags/2331"
pbrun4.0.8-03[9656]: 3003.01 Could not connect to a...
i write a perl code as a web service client using SOAP::Lite, it works fine in most cases.
When the server throw out the messege: "There is an error in XML document (1, 431)"
and the inner explanation is "Input string was not in a correct...
Hi,
I have script converting wav files to gsm.
Converting .wav files to .gsm
Create a bash script...
wav to gsm
for i in *.wav
do
sox $i -r 8000 -c 1 $(basename $i .wav).gsm resample -ql
done
Save the file as wav2gsm.sh or...
i am a total perl newbie but i have inherited a script to transpose a text file. For various reasons i have to use perl. The only thing is, i dont know how to feed it the script to be transposed. Can someone walk me through it. I have perl...
I can't figure out why a specific command isn't working and giving me a Null result.
The command in question is check_bl. The command works fine from the command line when logged in as the Nagios user. It gives the proper result for the mail...
Hi,
I am trying to parse a .xlsx file below..but getting the following error. It asks for the module Archive/Zip.pm. Does anyone have a working example as to what modules are exactly needed for this.
Can't locate Archive/Zip.pm in @INC ....
Hi guys, hope u r all well.
Guys im trying to learn how to read command line arguments by using the GetOpt module, but each time i run the following examples, which im assuming "should" work im getting an error saying:
"Undefined argument...
hi..
i have this perl code that create csv files as well as text files.
however, my csv fils could only print 1 output instead of 2.
how can i modify the below code to include the
foreach my $r(@$d) {
print FILE join("\t", @$r), $/;}
...
Hi all,
I'm pretty much looking for two things in this particular example. I'm running a small script which will test if a socket is (22/tcp in this case) is non-responsive or if there is a complete connection refused. Here's my code so far;...
I'm trying to get this part of a perl script to work.
$excludezone = "com\.ru";
if($domain2=~ m/\\$exclude_zone/ ) {
print "sorry $exclude_zone tld is not allowed";
}
I basically need an equivelent of PHPs intr function.
Thanks...
am using below to capture the last word of a given string:
REG_EXTRACT(EMER_CONTACT_N
The value(s) returned is as expected, it is the last word in the string prior to the last instance of whitespace. What I need is a...
Let say I have "12345" store in $str.
How do I tell how many chars are in $str ?
Pls. help me to configure these tools with Awstats..?
Links are:
http://awstats.sourceforge
http://www.telartis.nl/xcm
http://betterawstats.com/m
Hi,
I am new to perl. I am working on Debian/Linux
I have a perl file which calculates list of files has age more than 30 mins
And then it mails the list of the file
when I execute the file
I get error
...
The attached code produces the following output:
Excel results:
Standard Deviation 11.03035112
Skewness 0.363338937
Kurtosis -0.070497874
My results:
Standard Deviation 11.0303511188038
...
New user
I am getting the following error message:
Can't locate Net/SFTP.pm in @INC (@INC contains: ../lib.
/usr/lib/perl5/5.6.1/i586-
BEGIN failed—compilation aborted at …. line 3
line 3 has "use Net::SFTP;
use...
Why command below doesn't work? Even I try qx, it also doesn't work....
#!/usr/bin/perl -w
system "setenv P Hello";
print "\nEnvironment Variable P = $ENV{P}\n\n" ;
Pls advice.
Hi All:
I have to implement a circular queue of integers of user-specified size using a simple array. Provide routines to initialize(), enqueue() and dequeue() the queue. Please suggest ideas to make it thread safe.
Regards
sunnybrad
I have a base PDF document that I want to modify using PERL. Specifically, I have a PDF document that has text and images that will be on specific pages and locations within the PDF document. I'd like to replace the text and Images with differen...
We have a site using Uber Uploader (http://uber-uploader.sour
The problem is, if the uploaded file is larger than 127MB, it will give a "Failed To Find Flength File" error message.
Normally it...
Hi There,
I am attempting to install DBD-Oracle using ppm 4.0 on a Windows XP computer that has ActiveState version 5.10 installed. I could not do this successfully
These following are the attempts that I made to install the module:
1)...
Another team has a command shell that passes fills the ERRORLEVEL ( which is like a dos variable but it is not set with the SET command, it is a substitute only variable ). I would like to figure out how to change the Perl script to be able to...
I am very new to Perl. I need to find a solution to make client-side call to webservices using Perl.
Any sample code or direction would be very helpful.
Thank you very much.
Trying to move files between Linux machines using SCP with a regular expression. I can't tell if SCP uses regular expressions. Can this be done-- is there a better way?
Regex search:
/media/([a-z]+)/([a-z]+)/(
...
Hi,
I have a Perl script which works fine on Solaris 10 but it doesnot show any output when i run it on HP-UX 11 servers... I need to know unpack command to get values from HP wtmp file?
Hi,
I am new to Perl and Linux
I am using Debian
I wanted to install module ReadKey so i used command
cpan Term::ReadKey
I am getting error message: /bin/sh: cc: command not found
I tried to find which compilere I have
I used...
Hi,
I have problem with my perl script.
This perl script i added on my crontab that will run every hour.
But sometimes when i checked the log, the ftp is not running and got message :
Can't call method "login" on an undefined value at
...
Hi,
i would like to convert a date format into unix timestamp.
I searched the whole web but did not find anythin yet.
Any sollutions??
tnahx a lot
Hi.
I converted my perl script to EXE usng perl2exe. Now when I double click on my exe it runs great. I am also printing error messages in that. But as soon as the execution gets over , the window shuts down. How can I give some time of pause ,...
Hi,
I want to write a function to manipulate the variable that's passed into it, but if it's an array or hash i want to do the change to each member. is there an easy way to tell what type a variable is in Perl without making it a reference ?...
I've searched the net, and couldn't find anything about a problem I'm having with Net::SMTP.
Could you suggest something or direct me somewhere about this problem ? Ultimately I'm looking to get it resolved.
I get the error at various parts...
Trying to implement mget since it is not a built in function in the NET::FTP library but I keep running into problems. This is what I have:
my($ftp,$pattern) = @_;
foreach my $file ($ftp->ls($pattern)) {
print "File Name: $file \n";...
I'm moving some stuff to a new server and I'm getting this error:
DBI connect('okcdev00','xxxx',
Test script...
I have a ftpMonitor script which gets executed every 10 minutes (05, 15, 25, 35, 45 min of each hour). This script loops through a few directories to check if a file has been ftp'd. If it finds a file in one of the directories, then it moves the...
This is close, but it deletes everything =).
$BACKUP_DIR = "/var/www/backup";
# Read directory (ignoring . and ..)
opendir(DIR,"$BACKUP_DIR")
@files = grep(!/^\.\.?$/,readdir(DI
closedir(DIR);
...
I want to store an encrypted string in a cookie.
I will keep a key stored in a config file or database
I want to be able to decrypt the string after reading the cookie
I want to use the stored key to decrypt back to readable string
I would...
Experts,
I am using an installation of ActivePerl on IIS7 for testing. I have created a Handler Mapping for *.pl to PerlEx30.dll.
The nature of the Perl scripts are to interface with a SQLite database.
If I call the following simple line...
Context
- I am using Linux Hosting on a Dedicated server.
- The server is using Plesk.
- I have created a test.pl file with the following contents:
- I have given the perl script 755 permissions.
Problem
I am getting "404 - page not...
The script below lets me run iperf as many times as I want and then parses out the results into the information I want to see. It works nicely unless one of the IPERF tests times out, then since my script captures nothing on that test, the array...
How can I create arrays of hashes in Powershell? In other words, how can I make this (from Perl) in Powershell(if needed the anonymous friends array does not have to be included ):
Hi guys!
We use rclient a lot at our work to do this remotely from a command line.
Basically we do the following:
If we have to perform a remote function on remote pcs, we do the following:
net use x: \\computer1\ipc$ /u:useraccount...
Hello Perl Experts,
I'm trying to write a Perl script that can SCP to servers listed in a file (serverlist) one by one and copy a file to it. Using the perl module "Net::SCP", I can do remote copy by generating SSH keys and copying to...
Hi,
I need some help with writting a perl script. Here is what I need to do:
1. I need to pull down a bunch of files from an ftp server on a schedulable basis (mainly daily). The file names are all very similar in that they all start with...
Hi,
I need to add a couple of disks to a RAID5 vdisk on an MSA2312i. I've read that it can take a long time. The new disks are actually in a RAID1 vdisk at the moment which I'll drop and add to the RAID5 instead (currently has 4 x 300GB...
Hi,
I want to set a timer that will simply keep on doing something with a few seconds in between.
I tried the following, but it simply exists while the perl program should keep "printing time" every 2 seconds.
use Time::HiRes qw (...
Hi,
I have a set of libraries duplicated in the site_perl and vendor_perl directory. The ones I want to use are in vendor_perl (installed with an rpm) but perl seems to be using the site_perl ones... What is the difference between the 2? what...
I have massive log files from which I want to filter out lines containing phrases out of a list. So, I have put the words in an array and for every line, I have to go through a foreach loop.
Something like
my @phrases = ( 'phrase1',...
I would like to a write a simple perl script to login to Oracle sqlplus, execute certain commands and exit.
I am new to Perl ..
Can any one suggest easier way to do that..
$login = 'sqlplus user/password';
system($login);
logs me in to...
I have this in my code
$sql = "INSERT INTO `contractProducts` (`clientId`,`productId`,`p
Some eventlog-messages contains many characters and maybe with linebreaks and tabs.
An log-event like this gives me some problems:
The browser service was unable to retrieve a list of servers from the browser master \\DSM10 on the network...
I'm trying to get a vhost running bugzilla up and running on my apache 2 server.
After finally getting it installed, when I browse to the site, I get a 500 error.
The vhost's error log has:
[Tue Jan 17 11:58:29 2012] [error] [client...
I have the following perl code that copies and renames files with the current date appended to the file name. I need to modify it to move and rename the files with the date appended to the file name. I took a stab at it thinking move.pm would...
Hi,
I am trying to use cfgmaker to generate the mrtg config file. Below is my cfgmaker command line: -
/usr/local/mrtg-2/bin/cfgm
--global WorkDir:/usr/local/apache/
--global "Options[_]:bits,growright
I have installed Eclipse, Java JRE and Perl on my Windows 7 machine. I am trying to install the Perl Integration components into eclipse. So far, I think I have all of it installed with the exception of PadWalker.
I went to Bribes PPM...
The windows system call below has a plain text password.
system ("psexec.exe \\\\\%computername\% -u MyDomain\\MyUserID -p My_Bare_Password cmd /c \"i:\\share\\MyConfig.exe\
Is their a way that I can encrypt/hash the...
Hi,
I am using the Net::Telnet module and calling $telnet->cmd($command) to invoke a process on a remote 2K machine, from a shell script on linux. The process is invoked fine but the 'cmd' command does not return even after the remote process is...
The program is as follows:
# file name : killChild.pl
use POSIX ":sys_wait_h";
use strict;
my $etime = time + 1;
my $pid;
sub sigChild {
print "in the signal handler\n";
}
if ($pid = fork()) {
my $child;
do {
$child =...
Hi All,
I need to create a perl script to connect to a remote system using ssh.
When I connect to the remote system manually, I have to send a terminal type; "vt220" and then execute "display ..." command, this command display information...
I would like to convert the following code to VB or VB.NET. The code is for converting 26 bit Wiegand cards (access control). Thanks for the help.
# **************************
# convert the input Site Code and PIN...
Hi,
Previously, I have written a guestbook homepage plus a backend cgi script for my friend. I modified the perl script written by creators from http://www.thanks-cgi.com.
Hello,
I am trying to get DBD-Oracle-1.3.4 up and running on RHEL 5. I did see similar posts regarding this however it appears they were for windows.
I have DBI 1.52 installed along with Oracle instant Client and I am able to connect via a...
Hi,
I am looking to parse a json response from bash shell. I tried setting up jsawk but wasn't successful. can I get some help with sed or awk to parse the json response below. I know how to do this python but would like to know solutions in...
This is a pretty simple problem. I need to get a date/time stamp in the following format:
09:38:01.997 [Jun-09-2005]
I have written the following Perl script to do just that:
#!/usr/local/bin/perl
use Time::HiRes qw(usleep ualarm...
i want to write a script to add admin users to websphere. Is it possible to write in jython ? or perl is easier . Any pointers how to go about
Thanks !
e.g. I want to run "dir > temp" in the middle of perl script?
The dir is not echo'ed to stdout
# Make connection
$sftp = Net::SFTP->new($address, %args);
$sftp->ls('/tmp');
print "Finished\n";
exit;
I use the following regex to make every word in a string to make all words have first character uppercase.
$str="JB morGan & CO";
$str=uc($str);
$str=~ s/(\w+)/\u\L$1/g;
in this example my result would be Jb Morgan & Co which is ok in...
I have two files fileA and file B with following contents
fileA:
aaple
tomato
orange
pear
fileB:
tomato
cucumber
radish
mango
I need a code that will compare the two files and print the following:
1) words that are in file A ...
Hey,
I'm trying to build Perl within a development environment. For all intents and purposes, it's just Linux. I'm getting the following error.
Running Makefile.PL in cpan/Encode
../../miniperl Makefile.PL INSTALLDIRS=perl...
Hi,
my C# application is executing 'myperl.pl' script and this perl script is again executing 'myexe.exe'. I am using Process class to execute perl script and using Process.File = "perl.exe". Eventhough i am killing all these processes by...
I am parsing a webpage using a PERL script.
$page =~ s/\n//sg; # Removes all the newline symbols
Unfortunately, the output has some extraneous carriage-returns (CR, octal \015). (I am not sure how the original page was generated). Only...
Hello,
I have log files created in text format. I need to identify issues by certain log file comments, and I often have to wade through pages and pages of log files to find what I am looking for. perhaps, there is a better way.
I would...
I saw something about switch statements, so I tried one. But it's not working. Do you know what's wrong?
chomp( my $score = <STDIN> );
switch( $score )
{
case [90..100] { print "\n\nYou have an A!\n\n;" }
case [80..89] { print...
Well here is my code....
use Cisco::CopyConfig;
$config = Cisco::CopyConfig->new(Hos
print $config->error();
$config->copy('xxx.xxx.xxx
print $config->error();
I edited...
how can I split string in tcsh ?
In Perl, we have "split /token/,$string"
Is there something ismilar in tcsh script ? If not, what is the alternative.
Thanks in advance
I am getting a return code of 512 when I use the when clause to discard records with SQL Loader. Without the when clause (or with it with no discards) it works fine on other loads but with the discards it returns an error and I don't want it to....
I want remove any accents from the data in a UTF-8 file.
So for example:
"é" would become "e"
any ideas?
I have a user that wants to ftp a XLS file into Unix (solaris), I need a way to convert it from XLS to CSV. What can I use in Solaris Unix that can do this for me, or what kind of program do I need to write for it? If possible some could show me...
I'm using VIM in windows compatible mode so I can not use Ctrl+A or Ctrl+X to increment/decrment numbers. Is there any other way?
I've installed Active State Perl v5.8.7 (b.813) on my Windows XP machine. I then downloaded five modules, unzipped them, and copied the pm files to appropriate directories under C:/Perl/lib/.. creating folders as needed. (is there an 'install'...
if I have a perl script for example test.pl in Windows XP, how do I run the script by just typing "test.pl <arg1> <arg2>" in the command line instead of having to type "perl test.pl <arg1> <arg2"
I know this is possible because one of the...
Hi,
I've been trying to get OTRS running on IIS 6 www.otrs.org
The requirements by the developers are;
Apache 2
MySQL
PHP
Perl
I'm trying to stick it on IIS instead as the server I'm using is already running seeveral websites from IIS...
I know this is most likely elementry for u ppl, but could someone tell me what it means when PERL says -
"cant modify constant item in postincrement"?
Secondly, does anyone know where there are any address book or scheduler PERL scripts are?...
Hi,
I have problem when I calling a subroutine ParseDate from the perl scripts.
The module is not in the standard location. But I have added them into the code by using use lib "/home/abcd/lib/perl6/Date
The Date module (Manip.pm) is...
Hi,
I have a serious problem and I have not answers, I am researching and trying to solve it since two weeks ago. I need to use the system called OTRS in my Company (Open Request Ticket System . 3.04) , this tool is an Open Source release and...
I am trying to use the DBD::Oracle module and getting following error while executing the perl one-liner. Kindly help how to fix it. Thanks!
DBI connect('host=db.example.c
ozo
100,340
Master
0 points yesterday
Profilefarzanj
60,737
Master
0 points yesterday
ProfileFishMonger
45,500
0 points yesterday
Profilewilcoxon
39,566
0 points yesterday
Profilekyanwan
16,300
0 points yesterday
Profilebounsy
15,700
0 points yesterday
Profileparparov
14,460
0 points yesterday
Profileahoffmann
14,252
0 points yesterday
Profilesimon3270
11,550
0 points yesterday
ProfileBinaryWarrior
10,833
0 points yesterday
Profilekaufmed
9,856
0 points yesterday
ProfileDaveBaldwin
8,582
0 points yesterday
Profilexterm
8,500
0 points yesterday
Profilewoolmilkporc
6,372
0 points yesterday
ProfileRay_Paseur
5,900
0 points yesterday
Profilesjklein42
5,468
0 points yesterday
Profilearnold
5,100
0 points yesterday
Profilepfrancois
4,888
0 points yesterday
ProfileTintin
4,268
0 points yesterday
Profilejohanntagle
4,000
0 points yesterday
ProfilePapertrip
4,000
0 points yesterday
Profileslightwv
3,800
0 points yesterday
Profilenemws1
3,800
0 points yesterday
Profilebazika
3,668
0 points yesterday
Profiledragon-it
3,650
0 points yesterday
Profile