in reply to Re^4: Perl script help to convert .txt file to .csv
in thread Perl script help to convert .txt file to .csv

BEGIN { $/ = ">"; $\ = "\n"; }
  1. BEGIN: do what's inside the block (curly brackets) before getting involved with other parts of the script.
  2. $/ = ">";set the input record separator -- more or less, "use the greater_than symbol as a marker for the start of a new section to be read
  3. $\ = "\n"; set the output record separator to a newline (UNDERSTAND: these were provided by Deparse and are NOT explicitly set in the original one-liner.

In other words, more or less what you thought, "define the boundaries" of what your script will eventually see as a single-section's-worth-of-data. But, "<" is the less_than symbol, not a "carat" (nor "carrot" nor even what you probably intended, "caret").

... etcetera.

But most of the answers to your questions/guesses are available at your own terminal (or should be):

perldoc perlvar (special vars)
perldoc -f next
perldoc -f join

And you'll also find scads of help in the Tutorials section or by using Super Search or Dave Cross's specialized Perl Search (which, thanks to some rather neat hacks, outdoes big G when searching for punctuation-laden expressions).