Connecting Tech Pros Worldwide Forums | Help | Site Map

creating a file in specific directory

Newbie
 
Join Date: Jul 2006
Posts: 1
#1: Jul 25 '06
ok here i got some query

how to create a file in specific directory
this is the thing i got which isnt working

$movie=chandani
$song=arey re
open (TR, ">/$movie/$song");

isnt working .. why guys???

Newbie
 
Join Date: Jul 2006
Location: chennai
Posts: 6
#2: Jul 26 '06

re: creating a file in specific directory


this will work for you
system ("mkdir -p $movie/$song; touch $movie/$song/filename.txt)
Newbie
 
Join Date: Jul 2006
Location: chennai
Posts: 6
#3: Jul 26 '06

re: creating a file in specific directory


i missed qoutes
system ("mkdir -p $movie/$song; touch $movie/$song/filename.txt")
Reply