markb@agora.uucp (Mark Biggar) (09/30/90)
In article <1990Sep7.170029.16710@uvaarpa.Virginia.EDU> frech@mwraaa.army.mil writes: >I am working on a mailbox conversion routine and would like to use >^A^A^A^A\n^A^A^A^A\n as $/, slurp the whole file and process each message >as $_. The problem is when I set $/ it only takes the first ^A as the >record seperator (this is what the manual also indicates should happen). >Is there a way to overide this convention and specify $/ to longer than >one character? If you are going to slurp in the whole file anyway, just undef $/, slurp it in as one string and wrap the following around your code: foreach (split(/^A^A^A^A\n^A^A^A^A\n/,<FILE>>) { ... } Inside the foreach $_ will be set to each message in turn. -- Perl's maternal uncle Mark Biggar