$Some_Float = 5.46666
$Some_Float = sprintf("%.2f", $Some_Float );
Returns 5.47
But I want 5.46 (No ROUNDING)
sprintf rounds.... are you aware of something that would make it NOT r...
Hello, I have read in a file and would like to run through the array and remove any blank lines.
open(FILE, "Log.txt") or die("XP");
$/="\n";
@DATA = <FILE>;
close(FILE);
i want to extrac list from this line "first list = new first();" and want to store in a variable is it possible to do that and i have to extract this line from a file so how can i do that i kn...
Hi
I am calling the following command from a perl script to add a linux system user.
@addResult =`useradd -c no_comments -m -g ftp -p $passwd_crypt $username` or die " Error $!' ;
...
here is my perl code i wrote so far to get the rankings of a site on google for diffrent search results.
I got code like this to work in other programs like yahoo.
but I can not get ...
I have a process that return text using STDERR.
I need to run something like:
@out=`process command`;
To get the output, but this gets only STDOUT.
How can I get the STDERR like that in an Eas...
Hey,
I want to replace something with a regex like:
$string =~ s/$search/$replace/;
(i really need to use variables.)
but i want to use backreferences in $replace, so like:
$replace="lo...
What is the equivalent perl module for Win32::OLE on UNIX?
I am trying to grab the last line of data in a file to split and use as variables in a script without reading the entire file into memory.
Example text file:
12121:something_1:another_1
1...
I need to measure time in milliseconds in a perl program. The way I'd like to do it is
$a = get time
do things
$b = get time
$c = $b - $a
could anyone tell me how to go about thi...
Ok, PERL gurus! I am working on a project to allow streaming(scrolling) text for a cgi chat server in a
multi-framed HTML document. I have seen several client / server models and sample code, ...
Hi,
How could I give a perl script a top level folder (win32) and have it delete all sub folders (and their sub folders) that have a particular name? For instance:
Parent
...
I would like to modify a bit of code that is used to parse Cisco syslog format. Originally the code would look at a log entry such as the following line and perform it's analysis:
Sep 22 18:...
I am able to open and read a word doc using win32. i am looking for a way to detect words that are in bold. please help.
Thanks
Ned
My Perl knowledge is very limited (to say the least) and I'm wanting to do an equivalent of a vba mid/instring.
I have a string which could be as follows:
mystring=123456-blah
or
myst...
What is the max numeric value that perl can store without returning an error? both whole number and decimal numbers and also for a string
Hello everyone
I'm currently trying to modify a simple PayPal IPN script to send me more details about customers transactions, the problem I'm having is when I try to assign variables to lo...
The following code, as I'm sure one of you experts will know, is not executing as expected:
foreach (@cpus) {
$cpu = $_;
foreach (@prefixes) {
$prefix = $_;
}
`compos...
Hi All,
This should be easy for you PERL folks.
I have some of the fields in my guestbook script that are mandatory and I'm seeing where whitespace is entered in those fields and it mak...
Hi All
I need to add the ability to the calculate square yard and the price. This code currently does a square foot print out. It needs to carry two places past the decimal point. Example: ...
I need translate a code from PERL to C or C++.
Where can I found a tool for help me the translation ?
Is it possible to use Perl to Edit an Excel file.
I have found perl modules to create new Excel files (SpreadSheet::WriteExcel) and I have found perl modules to read Excel files(SpreadSheet...
Hi Everyone.
I am having a very complicated problem.I would really appreciate your help.Thanks.
I want to run a utility.exe command from my dos prompt on the server as the values keep refr...
I'm trying to get an image from an HTML form, resize it to a specific size, and then output to a directory on the server, but I'm running into problems. I made a post a few days ago, and someo...
Hi, Attached is a sample of what I believe to be a binary file. I would like help reading it via perl and simply outputting the data in ascii format. I also attached the spec describing the fi...