Programming Languages1.8k+ stars

Perl

The Practical Extraction and Report Language

Commit Details

Message
"a]\sym6500: Strstrcat, since strcat is built-in"
Author
Larry Wall
Date
1987-12-18
Hash
8d063cd8450e59ea1c611a2f4f5a21059a2804f1

Fun Fact

Larry Wall was a linguist before becoming a programmer. Perl reflects his love of natural language with its TIMTOWTDI philosophy.

</>First Code

C
/*
 * Copyright (c) 1987, Larry Wall
 *
 * You may copy the perl kit in whole or in part as long as you don't
 * try to make money off it, or pretend that you wrote it.
 */

#include "EXTERN.h"
#include "perl.h"

main(argc,argv,env)
register int argc;
register char **argv;
register char **env;
{
    register STR *str;
    register char *s;
    
    linestr = Str_new(65,80);
    str = str_make("hello, world\n",14);
    str_scat(linestr,str);
    fputs(str_get(linestr),stdout);
}