Hello,
If you are programming in C++, you can use this:
time_t rawtime;
struct tm *timeinfo; //Create a structure for system time
// Get system time
time (&rawtime);
timeinfo = localtime(&rawtime);
cout<<asctime(timeinfo)<<endl;
Hello stevexff and everyone,
I don't have problem with the command chdir. Actually the chdir (in windows) is the equivalent of pwd (in unix). The problem i'm encountring is that the parameter "-|" in the open function is not recognized in windows environnement. If you put this code on a unix...
Hello CJason,
There is different MODE for the open function.
if MODE is '-|', the filename is interpreted as a command which pipes output to us.
I got this explnation from this web site: http://perl.active-venture.com/pod/func/open.html
Hope this can say something to you.
Problem when moving a perl script wrote on unix to windows.
This script is wrote in perl on unix machine.
open(INPUT_LINE,"-|") || exec(chdir);
$current_path = <INPUT_LINE>;
chomp($current_path);
close(INPUT_LINE);
I have a problem with "-|" when moving a perl script wrote on unix machine to...
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.