Your code slurps the whole file into the first element of @Deploy. Probably not what you wanted.
EDIT: As jethro= points out the original code works. So the following code is no more correct than the OP.
Here, this works:
Outputs two elements as I think you wanted.Troll [113] as maint ~/ %cat foobar + [DING!] #!/usr/bin/perl @Deploy = split "\n",<DATA>; chomp(@Deploy); my @tmp = @Deploy; my %saw = (); foreach my $view_name (@Deploy) { print "view name is $view_name \n"; push (@Deploy1, $view_name) unless $saw{$view_name}++; } print join("\n",@Deploy1); __DATA__ t\test1\WEB\TEST/Admin*V:/test_viewINT/test_CVOB/test_src/Admin/AdminM +enu.asp" \\test\test1\WEB\TEST/Admin*V:/test_viewINT/test_CVOB/test_src/Admin/a +dminUser.asp" \\test\test1\WEB\TEST/Admin*V:/test_viewINT/test_CVOB/test_src/Admin/A +dminMenu.asp" \\test\test1\WEB\TEST/Admin*V:/test_viewINT/test_CVOB/test_src/Admin/a +dminUser.asp"
In reply to Re: Finding unique vals from a inout file
by starbolin
in thread Finding unique vals from a inout file
by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |