sub button1_tab1_Click {
    $file = GUI::GetOpenFileName(
        -owner => $W,
        -directory => "C:\\",
        -title => "Location of ",
        -file => $file,
    );
open (FILE , ">./datafile.txt")
print FILE $file;
close(FILE)
}


Now I am intending to do this

1) Store the full path of the openend file to a file "datafile.txt"
2) I have used ./datafile.txt assuming that the file will get stored in the
SAME folder as that of my PERL SCRIPT

BUT

when I open the file dialog and choose a file say "D:\mywork\pages\one.html"

the datafile.txt gets written in D:\mywork\pages\

when I open the file dialog and choose a file say "C:\important\rdf.exe"

the datafile.txt gets written in C:\important\

my perl script is all along at

E:\perlscripts\

SO how do I achieve my objective

chris


Reply via email to