On Friday, August 9, 2002, at 01:38 , Mat Harrison wrote:
> hi, i am trying to get an email to feed a perl script. > > I have aliased the email address to pipe to the program but nothing. What > variables should I be looking in to get the data that is piped? for > example, > command line arguments are in @ARGV. Is it something to do with $&? [..] It's the 'get an email to feed' part that confuses me. assume the simples of pipes ls -la | myPerlScript then the following would be a simple implementation of that ### #!/usr/bin/perl -w ### use strict; ### ### while(<STDIN>) { ### ### print "I see: $_"; ### } and would generate vladimir: 70:] ls -la | /tmp/drieux/silly.pl I see: total 818 I see: drwxrwxrwt 6 root sys 672 Aug 9 03:30 . I see: drwxr-xr-x 25 root root 512 Aug 5 13:36 .. I see: drwxrwxrwx 2 root root 179 Aug 4 23:16 .pcmcia I see: drwxrwxr-x 2 root root 176 Aug 4 23:16 .X11-pipe I see: drwxrwxr-x 2 root root 176 Aug 4 23:16 .X11-unix I see: drwxr-xr-x 2 drieux house 182 Aug 9 04:46 drieux I see: -rw-r--r-- 1 drieux house 115341 Aug 6 07:00 patches1028642408.html I see: -rw-r--r-- 1 drieux house 235943 Aug 6 07:01 patches1028642436.html I see: -rw-rw-r-- 1 root sys 5584 Aug 4 23:15 ps_data I see: -rwxrwxr-x 1 root other 48 Aug 5 13:35 sunpro.c.1.0. 4.20 vladimir: 71:] that technically works for 'getting the piped' data into the perl code... ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]