Hi ,
I'am trying to update a text file. But somehow it does not work. I gets the following error:
Can't "next" outside a block at PersonalfrmList.pl
Here a snippet of my code:
open(IN,"c:\\h\\CSSCS\\bin\scripts\\ListofFile.txt")|| die "Can't open ListofFile.txt...
Hi,
Is there a way to execute a system command and read the output through a while loop using the back tick.
Normally I excute a command like this.
ie
System("ls > ls.txt");
open RI,"<ls.txt" || die "can't open ls.txt: $!\n";
while(.....)
{...
Hi
I am reading a text file which contain the following string:
my $string = "\\domca-prn01\DH4-2139-HP4"
I need to verify that the string I am reading in has "\\" follow by either characters or numbers then "\" then either characters or numbers.
I try it...
Hi
Does anyone know a way in vbscript to get the hostname of a pc. I know you can execute "ipconfig -all" on command line
but I want to do it it vbscript.
Also is there a way to find if the printer connected to my pc is a local or a network printer
Hi,
HI,
Earlier somebody show me the following code :
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _...
Hi,
Hi ,
I have the following data in a text file:
Net to Media Table
Device IP Address Mask Flags Phys Addr
------ -------------------- --------------- ----- ---------------
hme0 192.45.10.250 255.255.255.255 08:00:09:40:0d:05
hme0...
Hi:
I am having problem turning the string "c:\/data/CDS/BCS3Lite" into "c:\\data\\CDS\BCS3Lite".
Someone suggest "s#[/\\]#\\\\#g" but this caused the string to become "c:\\\\data\\CDS\\BCS3Lite". Not what I wanted.
--thanks
Hi,
I want windows 2000 to execute a perl script at bootup .
But when I add the command to do so to the autoexec.bat and reboot nothing happen. When I ran the autoexec.bat on the command line my perl script is executed.
Can anybody tell me how I can get a perl script executed at bootup...
Hi, I want to find out if a file contain the following strings:
set CMP_DATA_INBND_DIR=C:\h\csscs\data\commi\tmp_queue
set CMP_DATA_OUTBND_DIR=C:\h\CMP\data\outbound
set JAVA_HOME=C:\h\COTS\JAVA2\1.3
set CSSCS_DATA=C:\h\csscs\data
and if not to add them to the file. So if the first three...
Hi,
Does anyone how to PERMENANTLY update the window environment variables with Perl.
For example if my PATH=c:\h\TOCBS\bin;
How can I make it PATH=c:\h\TOCBS\bin\;c:\Banner;
--thanks
Hi,
I am recursively searching my pc for a some files and renaming them. I can't get my script to avoid searching in a particular folder and its subdirectory. The folder in particular is 'c:\\WINNT'.
Here a snippet:
finddepth (\&rename_file_dir , "c:\\" );
sub rename_file_dir
{...
Hi,
I have a script that search my pc for folder or file that contain a certain substring and update them. The script also open files and search for the same substring and update them. The problem is my script take more than an hour to finish running and I suspect that it has something to...
I am trying to update a text file.
I have to substitute every word that consists of the word " apple" with "orange".
For example:
darkapplelite tapple &&%apple098 etc becomes
darkorangelite torange &&orange098 ...
Hi,
The strings "data/applered" or "new_apple_dark" are just example the strings might be any characters or noncharacters follow by the word apple like the following"
bag/applered
bag/appleold
--/apple0123
!#&apple$%%
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.