Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Perl >> Snippet

Code data for reading as records


print DEST "$a::$b::$c \n " ;        # print 3 variables to a single line in a file
                                 # "::" was chosen because is unlikely to occur in real data
( $a , $b , $c ) = split (/::/ $line )    # read 3 variables form a @line in the file
$a = $line [0]                     # same result as above (don't really need $a
$b = $line [1]                     # same result as above (don't really need $b
$c = $line [2]                     # same result as above (don't really need $c