```ruby
irb(main):002:0> P="/opt/dell"
=> "/opt/dell"
irb(main):004:0> /^#{P}/
=> /^\/opt\/dell/
```