Advertisement

635 organizations, including eBay, Ericsson and Lockheed Martin, now work smarter with Corporate Accounts. Save up to 42%

 

Welcome! If you have any general questions about Experts Exchange, feel free to ask me.

 
Time Tested Perl Solutions: 776 - 800 of 1722
 
Greetings Perl Experts, This is not a homework assignment.   I have written the following code. ==Begin code.pl #!/usr/bin/perl my @array = "trial.out"; my $element; for $element(@array...
I'm currently working on a "code generator" tool that uses an XSD as a reference. All I need is something that can parse the XSDs and put them in an easily to manage class/array so that I c...
Hi, I am trying to telnet to a remote windows machine using perl. I am using the following code: use NET::Telnet (); $remote = new Net::Telnet(Timeout => 10); $remote->open("machine_...
I have a small script that will search log files, the files go back several months, all the files that are over a week old are compressed so I use zgrep when seaching the ones older than a wee...
I'm running a perl script and am getting the following error message: DBI->connect(cest) failed: ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach) at /home/ces/bin/cin_load_picklist.c...
This is the code to get a y/n but when I make a subsequent call it does not ask for the input ! #! /in/local/bin/perl sub demande { my $in=0; system("echo \"Have u modified \""); $in = ...
Hi,   A basic question I guess. I have a string variable $machine_name that has leading and trailing whitespaces. I want to trim this variable of these spaces. What function should I use ? ...
Experts, I was wondering if there is any way to loop through an array of hashes. I was looking for a simple way to do this; Foreach $value($RC->[0]{'E_TIMESTAMP'}); { print $value; ...
Hi I am looking for assistance with what seems like a simple script but it's giving me problems. My script simply needs to take input from a user in the form of an IP address and then pass ...
I wish to solve a problem running a perl script using mod perl and apache under WinXP invoked via a server side include. Background. I am mirroring from a web site hosted on debian, with a...
How to replace - in one line - every <br>, <br/> and <br /> in line by \n. Replace: $test = "this is<br>working<br />example<br/>replacement!"; to $test = "this is\nworking\nexampl...
First, I have read through a number of previous posts here about uuencode and perl. As soon as I finish writting this, I'm going to explore MIME::Lite ,  but I'm curious as to the problem I'm ...
I am trying to automate my process of downloading a weekly .csv file from a site.  The url is "https://www.sitename.com/directory/filename.csv".  By following the link there is a windows promp...
Hi All I use this code to dynamically print the alphabet: my @Alphabet = ("A".."Z"); foreach my $Letter (@Alphabet) { print "$Letter "; } RESULT: A B C D E F G H I J K L M N O ...
Hello, I wish to execute a c programm form a perl script. say like this::I think did something wrong in the system function syntax.Please correct me. $result = system("gcc file.cpp"); ...
I need to script changes to two different files, both are xml, one is utf-8 the other is utf-16. I will start with an output file, need to make changes and then end with the files being in ...
Hi experts: Is there an easy way to break out of commandline output without waiting for input? Like a listener or something. This is on a linux system. The top command can do what I want to...
This is a complicated assignment for a programming class in perl that I am lost in trying to figure out. I can get the five cards from the top of the deck but shuffling using pop, shift and pu...
I know this should be simple and have searched and tested for hours.  I am executing a loop as part of the loop I want to rename a file, so the file does not get used again (I have this script...
I am currently using this code (in summary) to loop through my array -- but after once through - it ends. ------------ @all_load_files = glob("${path_gfr}\\ess\\${cube}\\datafiles\\*_Parms....
I have the following perl script to determine the intersection of two very large lists of numbers.  How can I do the same in C?  I'm hoping that by writing it in a compiled language rather tha...
Hopefully this is straightforward for a Perl wizard.  I'm sure the function is on the Web somewhere if I could find it.  I need a Perl function that does this (in pseudocode): GetDateStamp(...
I have an array that looks like this: 'Tablespace Name  =  ABC Data Size = 123 Log Size = 456 Free Space = 111 Tablespace Name = DEF Data Size = 456 Log size 123 Used Space = 333 Fr...
Hi all, I need a snippet of PERL that will convert bytes into a more readable format. For example converting 5000 into '5k', or 1000000 into 1mb.  Anyone have this laying around somewhere? ...
Hi , Iam using this command inside my perl script. system("net use M: \\\\Stmroot\\data\\Essoc\\Legal&Comp\\LC_GMP\\reports\\bo"); ... script code .. system("net use M: /DELETE "); Iam...