Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

globbing on remote network paths

Status
Not open for further replies.

jimbobfurley

Programmer
Joined
Jun 19, 2007
Messages
1
Location
CA
Hi all,

I am attempting to glob as such :

glob("\\sottbuild1f\\blacksea\\daily\\oqp\\*inst.tar.gz");

This is a remote network location, within my corporate LAN. This returns back nothing (empty array).
Is there a way I can get around this ?


Thanks in advance,
Travis
 
Yes, just open the directory instead and pull the entire contents. I do not know the specific reasons why a glob wouldn't work on a networked computer, but I suspect it may simply not be allowed on your setup.

Code:
[url=http://perldoc.perl.org/functions/my.html][black][b]my[/b][/black][/url] [blue]$dir[/blue] = [red]"[/red][purple]/sottbuild1f/blacksea/daily/oqp/[/purple][red]"[/red][red];[/red]

[url=http://perldoc.perl.org/functions/opendir.html][black][b]opendir[/b][/black][/url][red]([/red]DIR, [blue]$dir[/blue][red])[/red] or [url=http://perldoc.perl.org/functions/die.html][black][b]die[/b][/black][/url] [red]"[/red][purple]Can't open [blue]$dir[/blue]: [blue]$![/blue][/purple][red]"[/red][red];[/red]
[black][b]my[/b][/black] [blue]@files[/blue] = [url=http://perldoc.perl.org/functions/grep.html][black][b]grep[/b][/black][/url] [red]{[/red][red]/[/red][purple]inst[purple][b]\.[/b][/purple]tar[purple][b]\.[/b][/purple]gz$[/purple][red]/[/red][red]}[/red] <DIR>[red];[/red]
[url=http://perldoc.perl.org/functions/closedir.html][black][b]closedir[/b][/black][/url][red]([/red]DIR[red])[/red][red];[/red]

- Miller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top