Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: file data

by larryk (Friar)
on Aug 30, 2002 at 15:05 UTC ( #194131=note: print w/replies, xml ) Need Help??

in reply to file data

    do you see the problem here?

yes, you are missing use strict; and use warnings; from the top of your script. If you were to have these included then you would find out that you have a typo in your regex: $baseDir is not defined - it should be $subdir - and your filehandle <data> is invalid - it should be <DATA>.

other than that your code works as you expect

perl -le "s,,reverse killer,e,y,rifle,lycra,,print"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194131]
[james28909]: id just rename the subrouties perl what kind of data they are getting. something easy to remember too. like if get_data were returning movies titles, rename get_data to movies or movie_titles or get_movie_titles.
[james28909]: s/perl/per/
[james28909]: but i dont really know what your end goal is. if it works dont fix it lol

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2017-05-24 04:24 GMT
Find Nodes?
    Voting Booth?