Hi Guys,
I have a batch file containing the global variables that I am calling within the second batch file. Now, I want to call these global variables in Perl script instead of the second batch file. How to do that?
Here's what I am doing (two steps):
1. I have a batch file called...
Hi,
I want to search for a string in a text file and print the summary of total count of how many of it exists in the file.
For example, here my text in the file from which I want to count how many times 'Status: Updated' and 'Status: Created' occured each. Item UPC: 111, Desc: ALMOST...
Hi Guys,
I am trying to convert a multiple lines into a single line within the text file I have. Currently, I have this in the txt file:
Stores Updated: 626
Stores Created: 0
STATUS:09/01/2009:PASS
I want the output in the same file as (in a single line)
Stores Updated: 626, Stores Created...
Hi experts,
I have just installed SQL Server 2005 on my xp home (standalone)_machine. However, when I try to connect it to the server, it couldn't do so. I am entering '(Local)' when it prompts for server name in the dialogue box.
So, what am I doing wrong?
Thanks in advance.
Hi Guys,
I am trying to transfer file via. ftp using command line in my Perl script. However, for some reason after sending first file successfully, the connection gets lost. The log file (ftplog) shows the error as 'Not Connected'.
$command=("ftp -n -i -s:to_ftp.ftp > $ftplog")...
Hi Guys,
I am using the following ftp script in my Perl program. However, I want to track if the file has been successfully transfered or not. Is there any way to do this. I have browsed the net and this site exhaustively, but couldn't find any tips on this. Here's my small ftp script within...
Hi Guys,
I have a question. Hope you could help. I currently have a txt file, containing three lines of text, e.g.
Line_1. ABC
Line_2. DEF
Line_3. GHI
I want to open this file, search for these three lines in the file and have a new line added to the bottom of the same file as:
Line_sum...
Hi Guys,
I am currently working with Data Manager and inserting an SQL node to the build. I have incorporated a very simple update statement in this sql node. However, when I do this in sql helper, it is giving me following error:
UDA-SQL-0123: Insert/Update/Delete requests are not permitted...
Hi Guys,
I am deleting 180 days old files from a directory. Now, I want the output that should count the number of files deleted. Here's my code:
if (chdir($storage_ABC_Dir))
{
foreach $FILES (<pabc*.*>)
{
if (-M "$storage_ABC_Dir/$FILES" > 180)
{...
Hi All,
I need to compare two files with the same name in two different directories. What I want to do is to first look if the file exists in one directory. Then to check if the same file exists in the second directory.
For example: I have two directories, i.e. D:\directory1 and...
Hi Guys,
I am trying to extract and print a string, which also includes a 'period'. I want all the text before the 'period' sign. For example, the text looks like:
SREI120RE04.
SREI5151RE04.
SREI5151RE05.
SREI5151RE06.
I want to print only text before the period sign, so my output will be...
Hi Guys,
I have a script where I need to count the no. of files in a given directory and have an output something like this:
"Total no. of files: nn"
How to achieve this please? I am new to Perl.
Hi there,
I am trying to unlink a file, but even after supplying the command in my perl script, the file is still there in the directory. Following is my code:
$test_todb1 = $utils_dir."todb1.txt";
chdir ($utils_dir);
if (-e $test_todb1)
{
open(todb1file,$test_todb1)...
Hi,
I am writing a perl script that does some actions based upon the database (Oracle) availability. We have 2 databases. For example, if the 'Database 1' is avaialable, I want the program to do some required steps, and the same with 'Database 2'. Both are Oracle databases. If none of the...
Hi all,
I am writing a subrouting in perl where I am using chdir to change the directory to a mapped drive/directory. If it successfully changes the drive, then it proceeds further. However, if the chdir fails (it means the drive is not mapped) then the script maps the drive (with net use)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.