Search Results

Search: Posts Made By: balaji_red83
5,678
Posted By balaji_red83
Coolbhai, Hope this helps, Solution...
Coolbhai,

Hope this helps,

Solution 1:

my $input = '1234';
my $result = grep /./,split(//,$input);
print $result;



Solution 2:


my $input = '1234';
my @result;
my...
7,047
Posted By balaji_red83
When posting the question, post the expected...
When posting the question, post the expected output as well.
8,511
Posted By balaji_red83
Try this, my @nums =...
Try this,


my @nums = (2.1,1,3,10.1,10.2, 5);
my @sort_nums = sort {$a <=> $b} @nums;
my $grNum = pop @sort_nums;
print "Greatest Number is: ",$grNum;
5,043
Posted By balaji_red83
Try this, cat filename | while...
Try this,





cat filename | while read input

do

if [[ "$input" = "string to be searched" ]]

then

#do some action if string match

else

# do some action if...
6,103
Posted By balaji_red83
Try this, sed -e...
Try this,

sed -e "s/\[data3\]/[\/example\/string\]/g"
9,440
Posted By balaji_red83
Hi, Please try the below if you are looking...
Hi,

Please try the below if you are looking for solution in Perl,

while(<DATA>){
srand();
my ($start, $end) = split(/\s/,$_);
my $arr = [$start..$end];
push (my...
11,388
Posted By balaji_red83
Try the below code. This works even if you have...
Try the below code. This works even if you have comma more than once in a line.


use strict;
use warnings;
while(<DATA>) {
s/\"(.*?)\,(.*?)\"/$1.$2/ge;
print;
}
__END__...
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 04:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy