Re: array operation

2007-02-26 Thread Arun . S
Hi, On 2007/02/26, at 10:12, John W. Krahn wrote: print map "$_\n", @test; print "$_\n" for @test; Another solution is setting the $" variable: my @array = qw(1 2 3 4 5); {     local $" = "\n";     print "@array"; } The above code does not seem to work for me. I get an error say

Re: Passing hash into sub routines (should i use reference?)

2007-01-17 Thread Arun . S
Hi, Suppose I have this code: #/usr/local/bin/perl use warnings; use strict; use subs 'verify'; my %where=( Gary => "Dallas", Lucy => "Exeter", Ian => "Reading", Samantha => "Oregon" ); # Then i open a logfile open FH, '<', $logfile or die "Can't open $logfile

run command in a particular dir

2007-01-08 Thread Arun . S
Hi, I need to run a particular command "cleartool des " from a partiuclar folder. For example: I need to get into directory m: cd \ Arun_Main and then run cleartool des $temp . I wrote the following code for this foreach $temp(@vob2) { qx(m: cd \\Arun_Main); $x = qx(cleartool des $temp); $hash{$

Re: Syswrite Function in Perl

2007-01-02 Thread Arun . S
> $input = ; > @input = split(/ +/, $input); > $new = join ("", @input); Why not just modify the string instead of splitting and joining: ( my $new = ) =~ s/ +//g; I believe the above line does not work. It must be ( my $new = ) =~ s/ \+//g; Whilst this email has been checked for all known