creating a file in specific directory

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • perljaadu
    New Member
    • Jul 2006
    • 1

    creating a file in specific directory

    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???
  • sun99
    New Member
    • Jul 2006
    • 6

    #2
    this will work for you
    system ("mkdir -p $movie/$song; touch $movie/$song/filename.txt)

    Comment

    • sun99
      New Member
      • Jul 2006
      • 6

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

      Comment

      Working...