How do I get the filename without the extension and replace that extension with a new extension?
I need to write a script to execute command on the remote machine. I am logging into the remote machine without password.
I found on the goole that I need to install Net::SSH::Perl to ex...
I'm trying to concatenate 2 arrays. The catch is that I'm trying to concatenate the elements. like the following
my @array = qw/one two three four/;
my @array2 = qw/a b c d/;
I want the...
%aList = ('car'=>300,'train'=>150,'truck'=>100,'bike'=>330);
I need to write a program to sort this by the order of key and value respectively without
using the sort functions provided by ...
is it possible to delete line of a file in perl without opening and closing a file
i mean i know to create a new file blah..... but that is a long way....
i want simple unix command to be ...
Hi, based on server restrictions and a recently asked question, I am sending text file attachments using
system("cat nc/jh10083.txt | unix2dos | uuencode nc/jh10083.txt | /usr/sbin/sendmail...
I am using Linux and writing a script in Perl to connect to SQL Server 2005. I think I have to use ODBC, does anyone know the connection string method?
I have a set of files and I would like to check if they are correct UTF8.
For doing this I would like to use Perl or some shell command.
Who may I do it?
I'm having a terrible time with File/Tail.pm with ActivePerl 5.8.8 Build 820. I contacted ActiveState but they haven't responded yet.
I get this error:
D:\>C:\perl\bin\ppm install File::...
Hi,
I need to monitor recursively a directory for new created files.
I am using the File:Monitor package. (http://search.cpan.org/~andya/File-Monitor-0.10/lib/File/Monitor.pm)
which works...
Hello,
I'm using Net::Telnet::Cisco to update configs on multiple Cisco routers (all are 1841 model). The script reads from a CSV file that has the router IP, and commands to be entered. Th...
Hello
I need to post an XML file to an awaiting web-service across an HTTPS connection.
I've been trying using both cURL and LWP::UserAgent/HTTP::Request with no joy.
When I try usi...
Hello,
I am still kinda of new to PERL programming, and need some help with system commands, pipes, and network shares / drives on Windows. I am trying to XCOPY a file to a network drive o...
Hi,
I have a Perl script that runs in Microsoft IIS server as a CGI script, and does the following:
1) Reads stuff from the database,
2) Creates a plain text file to describe some data...
I am having trouble parsing whitespace in a string. I am able to remove whitespace at the end and at the bgeinning of a string but I need to also perform replacement of whitespace with charact...
Hi all,
I have a list of session ids with timestamps (using the Perl time function). I want the sessions to expire if they have lasted longer than two hours. So, I have a cron job that runs...
Hi,
Can anyone help me in knowing the use of qw and qq and their difference. I would appreciate if you provide me with examples.
Thanks
I would like to insert data into a webpage template using a variation of the following function:
sub insert_html {
# create new cgi object
$cgiobject=new CGI;
#read in template ...
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-...
Hello,
I have to get a string from binary file. But to get it have to parse the file. Fortunately it's structure is known, but some parts size defined by integer numbers in the file. So it go...
I try to log some debug info to a log file. Here is code. When I run , it didn't log STEPONE to the file test.log. Please help.
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/....
Hi,
There's a nice perl module which I really want to use:
PDF::Reuse
You create a PDF in the following manner (According to the instructions)
prFile(FILENAME)
...lines of cod...
In perl, how can I execute a system shell command, but not wait for the command to complete?
I am used to using the backtick method as shown below, but I do not want to wait several seconds...
Dear Experts -
I've the following script, and I would like know the working directory (PWD) before its deleting the files.
sub deleteRemoteFiles
{ foreach $fname (keys %remoteFile)
...