Reading a File via Perl Script

Reading with <> into an array: gets lines into array as is in file along with new line chars. each $line_$i in file = $arr[$i] Reading with <> into hash : sets $has{$key} = $value. where $key = line_$i and $value = line_$i+1 respectively. < p>Reading with <> using while loop: gets each line along with "n" chars

Read more

Perl System Command and Return Codes

Many of you must have used Perl as part of day to day automation. Some teams use test harnesses made exclusively of Perl. This makes it easier to leverage various functionalitiesof text manipulation, file operations and process monitoring, etc which is needed for a functional test harness. More often, system command is used to run an executable and its return code ($?) is used to compare with expected return code. Normally, a successs means value of $? is zero and failure if otherwise. This is good if you plan to write tests from scratch and team decides to go with […]

Read more

How to start a process as another user from Visual Basic

This article shows you how to programmatically start a process as another user from Microsoft Visual Basic. To do this, you can use the LogonUser and CreateProcessAsUser Win32 APIs on a computer that is running Microsoft Windows NT 4.0, or you can use the CreateProcessWithLogonW Win32 API on a computer that is running Microsoft Windows 2000 or later. CreateProcessWithLogonW cannot be called from a process under the LocalSystem account. Back to the top MORE INFORMATION This article contains sample Visual Basic code that detects the version of the o… This article contains sample Visual Basic code that detects the version […]

Read more