From owner-freebsd-questions@FreeBSD.ORG Mon Jul 3 00:54:37 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F9CB16A40F for ; Mon, 3 Jul 2006 00:54:37 +0000 (UTC) (envelope-from nikolas.britton@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id A74F843D45 for ; Mon, 3 Jul 2006 00:54:36 +0000 (GMT) (envelope-from nikolas.britton@gmail.com) Received: by nz-out-0102.google.com with SMTP id x7so214572nzc for ; Sun, 02 Jul 2006 17:54:36 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mxVXcfbQDUKMhU1uWk6j29MqZ9SFvUMzlXw9a0UOJkk6hFj1kmoKRz5A0Rk5T69d3ZAF3d6HkjJs+12xSWgLewh4wbayPJC9aSC+cRoB9Bh2Jwct9ADmk5uODUXGMEOgbzsvdZaIH2aVwkf78QjhlgCufYNCmf+0fgBTX/2iVDM= Received: by 10.36.33.6 with SMTP id g6mr3070262nzg; Sun, 02 Jul 2006 17:54:36 -0700 (PDT) Received: by 10.36.12.11 with HTTP; Sun, 2 Jul 2006 17:54:36 -0700 (PDT) Message-ID: Date: Sun, 2 Jul 2006 19:54:36 -0500 From: "Nikolas Britton" To: jdow In-Reply-To: <02fa01c69e26$320063b0$0225a8c0@Wednesday> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060702153621.99746.qmail@web39104.mail.mud.yahoo.com> <02fa01c69e26$320063b0$0225a8c0@Wednesday> Cc: freebsd-questions@freebsd.org Subject: Re: another newbie X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2006 00:54:37 -0000 On 7/2/06, jdow wrote: > From: "Andrew Pantyukhin" > > > On 7/2/06, Isaac Friedman wrote: > >> I am new to UNIX but know the basics of getting > >> around, writing simple shell scripts, etc. Is there > >> any way to use a short perl program as a shell script? > > > > sat64% cat << __END__ > ./script.pl > > #!/usr/local/bin/perl -w > > print "Hello world!\n"; > > __END__ > > sat64% chmod a+x ./script.pl > > sat64% ./script.pl > > Gee, Andrew, you didn't need to obfuscate it that way. I can read his code just fine... Here's obfuscated perl: `$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=( $!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++; $_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$\$,$:$%[$?]",$"&$~,$#,);$,++ ;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=` -- BSD Podcasts @: http://bsdtalk.blogspot.com/ http://freebsdforall.blogspot.com/