manishrathi has asked for the wisdom of the Perl Monks concerning the following question:

I have a Perl file autoConfig.pl and it outputs comments to a log file. Where and by what name would this log file be created ? Wil it be in same location as autoConfig.pl ? OR will log file be created in different location ? Can someone please let me know from following code segment ?
....my $displayOnlyNonProdRegion = 0; $selected_release_cnt = 0; $logname = $cgi->{form}{LOGFILE}; $rowcnt = $cgi->{form}{rowcnt}; $user_id = $cgi->{cookie}{iw_user}; $site = $cgi->{form}{selected_site}; $releaseDCR = $cgi->{form}{selectedReleaseDCR}; if ($ENV{HTTP_REFERER} !~ "scc_sel_edition"){ ## if coming from deploy edition script $rowcnt = $cgi->{form}{release_cnt}; } #used to tunnel all of the GET/POST args that are not explicitly manag +ed by the cgi. $other_tunneled_data = $cgi->get_implicit_data_tunnel_html(); # open LOG_FILE, ">>$logname" or print "Unable to create logfile: $log +name\n"; open LOG_FILE, ">>$logname" or print "Unable to create logfile: " . av +t_encode_path($logname) . "\n"; autoflush LOG_FILE 1;...........
Thanks

Replies are listed 'Best First'.
Re: Where does LOG_FILE get created with following code ? (ddumper)
by Anonymous Monk on Jan 23, 2014 at 04:49 UTC
Re: Where does LOG_FILE get created with following code ?
by GotToBTru (Prior) on Jan 23, 2014 at 14:25 UTC

    The log file name (and perhaps path) are contained in the variable $logname. That variable is populated from hashref $cgi. No way of knowing beyond that based on what little you have posted.