Net::Traceroute uses the traceroute program to obtain the jump information.
On Windows that program is called tracert rather than traceroute (the name of the executable on linux systems), in order to a use the windows binary you need to set the trace_program setting when you call the Net::Traceroute constructor, so adding the additional parameter trace-program=>"tracert" sets that value for the instance you create. Note that the code I originally provided will actually throw an error it should read:
Hi
I want to merge two or more files using perl in windows only(Just like Paste command in Unix script) . How can i do this.Is ther any single command to do this?
Thanks
Kunal (1 Reply)
How to change a directory on windows via perl script.
I wanna mount a share on windows via perl script.
I have used:-
system("dir");
gives the list of directories in the drive i am.This command works well.
Now i want to move from c drive to z drive via perl script.I am using:-
... (2 Replies)
Hi All,
Im having a file named logserver.txt. I want a perl script to take a backup of that file, along with the datestamp; move the file to a different location or empty the contents of the file after backup.
Remember, the file gets generated when the related service starts. My condition is... (14 Replies)
Hi All,
Need help configuring Active Perl on Windows Vista.
I am trying to install Active Perl on Windows Vista.
The version of Active Perl i am trying to install is : ActivePerl 5.10.1 Build 1006
After installing it through cmd, When i try to run perl -v to check the version, i get the... (2 Replies)
Here is the snippet of the code that I'm trying to execute.
Stat of the service does not launch perl script. OnStop works fine. Please could you help here.
Public Class Service1
Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This... (0 Replies)
This script is giving weird output
#!/bin/bash
NETPATH=(`/bin/traceroute -n 4.2.2.2 | awk '{print $2}'`)
for i in "${NETPATH}"
do
echo $i
done
The output:
to
11.11.11.1
1.1.1.1
99.111.208.2
traceroute_test.sh
traceroute_test.sh (7 Replies)
Hi i wanted to know if any one can give me an example on how to launch a windows program in a perl script. I wanted to open the nmap software on my computer with a perl script, i heard this can be done with the system function. Would the function be in this format:
$text =... (1 Reply)
I have a Perl script that worked fine before moving it to justhost.com. It was on a Windows/Apache server. Just host is using UNIX. Other Perl scripts on other sites that were also moved work fine so I know Perl is functioning.
The script is called cwrmail.pl and is located in my cgi-bin.
When I... (9 Replies)
I am writing a perl code(windows) to traceroute IP address and to print the output.
Could anyone please supply the code.
I had executed the below code which was taken from cpan modules
#!C:/perl/bin/perl.exe
use Net::Traceroute;
$tr = Net::Traceroute->new(host=> "google.com");... (1 Reply)
Hi all,
I am developing a log parsing agent in perl to send windows Event logs to Zenoss Monitoring tool. Using Win32::EventLog i can able to get the Event messages but only one Eventype eg Application or System could able to parse at a time. Can you please help to how to open mutiple eventlogs... (3 Replies)
Discussion started by: kar_333
3 Replies
LEARN ABOUT OSX
test::script
Test::Script(3) User Contributed Perl Documentation Test::Script(3)NAME
Test::Script - Basic cross-platform tests for scripts
DESCRIPTION
The intent of this module is to provide a series of basic tests for 80% of the testing you will need to do for scripts in the script (or
bin as is also commonly used) paths of your Perl distribution.
Further, it aims to provide this functionality with perfect platform-compatibility, and in a way that is as unobtrusive as possible.
That is, if the program works on a platform, then Test::Script should always work on that platform as well. Anything less than 100% is
considered unacceptable.
In doing so, it is hoped that Test::Script can become a module that you can safely make a dependency of all your modules, without risking
that your module won't on some platform because of the dependency.
Where a clash exists between wanting more functionality and maintaining platform safety, this module will err on the side of platform
safety.
FUNCTIONS
script_compiles
script_compiles( 'script/foo.pl', 'Main script compiles' );
The "script_compiles" test calls the script with "perl -c script.pl", and checks that it returns without error.
The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the
local name used will be shown in the diagnostic output.
Note also that the test will be run with the same perl interpreter that is running the test script (and not with the default system perl).
This will also be shown in the diagnostic output on failure.
script_runs
script_runs( 'script/foo.pl', 'Main script runs' );
The "script_runs" test executes the script with "perl script.pl" and checks that it returns success.
The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the
local name used will be shown in the diagnostic output.
The test will be run with the same perl interpreter that is running the test script (and not with the default system perl). This will also
be shown in the diagnostic output on failure.
SUPPORT
All bugs should be filed via the bug tracker at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Script <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Script>
For other issues, or commercial enhancement and support, contact the author.
AUTHOR
Adam Kennedy <adamk@cpan.org>
SEE ALSO
prove, <http://ali.as/>
COPYRIGHT
Copyright 2006 - 2009 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.16.2 2009-11-23 Test::Script(3)