On Tue, 30 May 2006, listmail wrote:
Untested, off-the-cuff suggestion...
This looks suspiciously like a homework assignment. ;)
> #!/usr/local/bin/perl -w
> use strict;
>
> my @data = ('NUMBERS: ONE TWO THREE',
> 'WORDS: CAT MOUSE DOG');
> my (@numlist, @wordlist);
>
> foreach my
On Tue, 30 May 2006, Cai, Lucy (L.) wrote:
> When I run the command, I got the following message:
>
> [EMAIL PROTECTED]:~/test_ooo/vobs/na_mscs_12836sas_deploy> sudo -u prxpccsv
> /ccstore
> /fmcc/triggers/ApplyVobTriggers.pl
> Password:
> Empty compile time value given to use lib at
> /ccstore/
#!/usr/local/bin/perl -w
use strict;
my @data = ('NUMBERS: ONE TWO THREE',
'WORDS: CAT MOUSE DOG');
my (@numlist, @wordlist);
foreach my $line (@data) {
print "$line\n";
if ($line =~ /^NUMBERS:/) {
#
#Need to shift $line so $line becomes onl
>
> How can I add a path /ccstore/fmcc/triggers/ into @INC path?
>
There are at least two ways I know of. I'd generally use the first one
unless package lib is unavailable on your machine.
use lib '/ccstore/fmcc/triggers/';
--OR--
BEGIN
{
push(@INC,'/ccstore/fmcc/triggers/');
}
__
When I run the command, I got the following message:
[EMAIL PROTECTED]:~/test_ooo/vobs/na_mscs_12836sas_deploy> sudo -u prxpccsv
/ccstore
/fmcc/triggers/ApplyVobTriggers.pl
Password:
Empty compile time value given to use lib at
/ccstore/fmcc/triggers/ApplyVobTrig
gers.pl line 25
Can't locate Trigg
Arijit Das wrote on 05/30/2006 02:51 AM:
I need to search for "/dir2/bin" path component in my
$ENV{PATH}, and then, insert "/newpath/bin" just
before "/dir2/bin".
[...]
Is there any Perl Array (somewhat like @INC) which I
can modify to have my PATH changed?
Maybe this CPAN module can help you:
Arijit Das wrote:
> Hi,
>
> The format of env variable PATH seems to change with
> OS/shell. For example,
> in sh it is like
>
> "/dir1/bin:/dir2/bin:."
>
> while in csh, it is like
>
> (/dir1/bin /dir2/bin .)
>
> I need to search for "/dir2/bin" path component in my
> $ENV{PATH}, and then
Hi,
The format of env variable PATH seems to change with
OS/shell. For example,
in sh it is like
"/dir1/bin:/dir2/bin:."
while in csh, it is like
(/dir1/bin /dir2/bin .)
I need to search for "/dir2/bin" path component in my
$ENV{PATH}, and then, insert "/newpath/bin" just
before "/dir2/bin"